diff --git a/main.js b/main.js index 7c42510..da71422 100755 --- a/main.js +++ b/main.js @@ -2,11 +2,13 @@ var program = require('commander'); var SwaggerParser = require('swagger-parser'); +var RefParser = require('json-schema-ref-parser'); var openapi2slate = require('./openapi2slate.js'); program .arguments('') + .option('--dereference', 'Do not generate Markdown, just dereference to single JSON') .option('--validate', 'Validate the API') .option('--include-internal', 'Include Internal API calls') .action(function(file) { @@ -19,6 +21,18 @@ if(typeof apiFilePath === 'undefined') { process.exit(1); } +if(program.dereference) { + RefParser.dereference(apiFilePath) + .then(function(deRefApi) { + console.log(JSON.stringify(deRefApi)); + process.exit(0); + }) + .catch(function(err) { + console.error('API dereference failed: ' + err); + process.exit(1); + }); +} + if(program.validate) { SwaggerParser.validate(apiFilePath) .then(function(api) { diff --git a/scripts/test.sh b/scripts/test.sh index 3cec8f6..c61e969 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -17,6 +17,11 @@ echo "# $out matches" ./main.js $input/basic.yaml > $output/$out diff $check/$out $output/$out +out=basic.json +echo "# $out matches" +./main.js --dereference $input/basic.yaml > $output/$out +diff $check/$out $output/$out + out=scrive_api.md echo "# $out matches" ./main.js $input/scrive-apidocs/scrive_api.yaml > $output/$out @@ -27,5 +32,10 @@ echo "# $out matches" ./main.js --include-internal $input/scrive-apidocs/scrive_api.yaml > $output/$out diff $check/$out $output/$out +out=scrive_api.json +echo "# $out matches" +./main.js --dereference $input/scrive-apidocs/scrive_api.yaml > $output/$out +diff $check/$out $output/$out + # TODO add more example conversions # TODO add a run with validate flag diff --git a/test/check/basic.json b/test/check/basic.json new file mode 100644 index 0000000..6cbab07 --- /dev/null +++ b/test/check/basic.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"title":"Title\n","version":"0.0.1","description":"# First heading\n\nSome description, with `monospace`, _italic_, and **bold**.\n\n\n\n## Second level heading\n\n> Multi\n> line\n> quote\n\nAnd also some code with syntax highlighting\n```json\n{ \"foo\" :\n [ \"bar\", \"baz\" ]\n}\n```\n","contact":{"name":"Contact name","url":"https://example.com/","email":"contact@example.com"},"termsOfService":"Here goes the terms of service.\n","license":{"name":"Whatever you want"}},"host":"example.com","basePath":"/base/path","schemes":["https"],"tags":[{"name":"Tag1"},{"name":"Tag2"}],"paths":{"/foo/bar":{"get":{"summary":"Summary text","tags":["Tag1","Tag2"],"description":"Description text\n","responses":{"200":{"description":"Response description `HTTP 200`\n"}}}}},"parameters":{"Parameter1":{"name":"parameter_1_name","in":"path","required":true,"description":"Parameter1 description\n","type":"integer","format":"int64"}},"responses":{"Response1":{"description":"Response description","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Response schema title","type":"object","description":"Response schema description","properties":{"id":{"description":"Foobar","type":"string","readOnly":true}},"example":{"id":"bazbaz"}}}}} diff --git a/test/check/help b/test/check/help index da88e2b..7fb580d 100644 --- a/test/check/help +++ b/test/check/help @@ -1,6 +1,7 @@ Usage: main [options] Options: + --dereference Do not generate Markdown, just dereference to single JSON --validate Validate the API --include-internal Include Internal API calls -h, --help output usage information diff --git a/test/check/scrive_api.json b/test/check/scrive_api.json new file mode 100644 index 0000000..7aca03d --- /dev/null +++ b/test/check/scrive_api.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"title":"Scrive Document API","description":"# Overview\n\nThe Scrive Document API uses HTTPS methods and RESTful endpoints to create,\nedit, and manage the life-cycle of documents in the Scrive eSign system.\nJSON is the data interchange format, but we also use query parameters.\n\nThe API is accessed through a versioned URL.\nThis allows users to clearly identify which API they are using, and to make\nit easier to upgrade to any newer versions.\nIt also avoids having to use version codes in HTTP headers.\n\nAny breaking changes to the API will be introduced through a new version\nnumber.\nWe aim to keep these changes to a minimum, and when we do so, will support\nthe current API until it is phased out.\n\n\n\n\n\n\n\n## Changelog\nWe will list any changes to the current version of the API here.\n\n| Date | Details of changes |\n| ----------- | ---------------------------------------------------------- |\n| 2020-06-29 | Added documentation for custom SMS messages. |\n| 2020-06-15 | View Folder endpoint: added `recursive` parameter and fields: `home_for_user`, `home_for_user_group`. |\n| 2020-06-02 | Add Onfido authentication to sign methods, also add missing `fi_tupas` for setauthenticationtosign`. |\n| 2020-05-08 | Added IP address to [Environments & IP Addresses](#environments-amp-ip-addresses). |\n| 2020-04-20 | Added `nl_idin` and `fi_tupas` to various `authentication_method_to_*`. |\n| 2020-04-02 | Updated endpoint list to include missing ip-addresses. |\n| 2020-03-04 | Add user tags API. |\n| 2020-02-21 | Change the format of user group tags. |\n| 2020-01-28 | Add support for tags in the user group API. |\n| 2020-02-05 | Change `getbyshortid` limit from 24 hours from created/modified time, to 72 hours from created time. |\n| 2019-11-25 | Add folder API documentation. |\n| 2019-11-15 | Update production IP addresses. |\n| 2019-09-30 | Add `verimi` to `authentication_to_view`. |\n| 2019-08-15 | Add access control API documentation. |\n| 2019-07-19 | Add user and user group API documentation. |\n| 2019-04-09 | Documented link confirmation delivery. |\n| 2019-04-01 | Reordered the changelog - new changes are now on top. |\n| 2019-03-27 | Clarified cases where fields can also have a null value. |\n| | Clarified use of `authentication_method_to_*` |\n| 2019-02-25 | Add `gettokenforpersonalcredentials` endpoint and update `getpersonaltoken` to accept `login_token`s |\n| 2019-02-18 | Add monitoring endpoint which was already implemented but missing from this document |\n| 2019-01-03 | Add `usagestats` endpoints\n| 2018-12-17 | Add `fi_tupas` (Finnish EID) to `authentication_method_to_view`/`authentication_method_to_view_archived` |\n| | Add documentation for `/documents/trash` and `/documents/delete` bulk endpoints |\n| | Add documentation for `authentication_method_to_view_archived` |\n| | New signatory role: approver. New `Signatory` field `signatory_role`, supercedes `is_signatory`. |\n| 2018-06-01 | Add `dk_nemid` (Danish NemID) to `authentication_to_sign` |\n| 2018-04-09 | Add a new field to the [Signatory JSON](#signatory): `consent_module` |\n| 2018-03-29 | Fix an omission where `no_bankid` (Norwegian BankID) was missing as an Authentication to Sign |\n| 2018-03-26 | Add `rejection_reason` to the Signatory JSON and an API endpoint to control [template sharing](#share-or-unshare-templates) |\n| 2018-02-28 | Fix a minor error in the [Quick Start](#quick-start) guide |\n| 2018-01-29 | Add an endpoint to [change the email and mobile number of a signatory](#change-the-email-and-mobile-number-of-a-signatory) |\n| 2018-01-08 | Add an endpoint to [get a sign link as a QR code](#get-a-sign-link-as-a-qr-code) |\n| 2017-11-15 | Custom validations for the `SignatoryFieldCustomField` are now supported |\n| 2017-08-03 | Revamped definitions of signatory fields, it should now be much clearer |\n| | Added `SignatoryFieldRadiogroup`, Scrive now supports radio button fields |\n| | Factor out `SignatoryFieldStandard` into `SignatoryFieldEmailMobile` to allow for `editable_by_signatory` property |\n| 2017-07-04 | Remove a comment about anchoring that was due to a bug, which has now been fixed |\n| 2017-06-08 | Add `required` field to signatory attachments, optional attachments are now possible |\n| 2017-05-15 | Add missing `company` standard signatory field |\n| 2017-03-11 | Add `dk_nemid` (Danish NemID) to `authentication_to_view` |\n| 2017-01-28 | Documentation of `removepages` API call |\n| 2017-01-17 | Add JSON fields related to highlighting |\n| 2016-12-17 | New optional `no_attachments` parameter for the `forward` API call |\n| 2016-10-27 | Small improvements to documentation following internal and customer feedback |\n| 2016-10-14 | Pre-release of Scrive Document API Version 2 |\n\n\n## Environments & IP Addresses\n\nThis section provides details on the IP addresses used by the Scrive Service. You may want to whitelist\nthese addresses in your firewalls for outgoing traffic but more importantly for incoming traffic from\nScrive eSign when using callbacks.\n\n\n\n\n### Production\nThe main application is available through the `scrive.com` domain.\n\n\n\nThe IP addresses that may be used as endpoints to and from our system are:\n\n* 46.51.201.244\n* 52.208.49.53\n* 54.229.202.191\n* 54.246.132.30\n* 54.72.249.47\n* 54.72.251.235\n* 34.251.5.243\n* 52.208.131.2\n* 99.80.133.235\n\n### API Testbed\n\nA testing environment is available through the `api-testbed.scrive.com`\ndomain.\n\nThis environment should be used when developing an integration with the\nScrive eSign system.\n\n\n\nWe usually deploy the latest production environment to our API testbed, but\nmay occasionally update it with newer builds, which may not be as reliable\nor well tested.\n\nThe API testbed uses `54.229.20.170` as its IP address.\n\n## API Explorer\nAn interactive API Explorer is available for both environments:\n\n* [API Testbed](https://api-testbed.scrive.com/api-explorer)\n* [Production](https://scrive.com/api-explorer)\n\nThis is useful way to test API calls and the OAuth workflow.\n\nThe implementation is in JavaScript and you can use\n[Firebug](https://getfirebug.com/) or the\n[Google Chrome DevTools](https://developer.chrome.com/devtools) to inspect\nHTTP requests.\n\n## Upgrading from Version 1\nThere is no change to the Document workflow from Version 1 of the API.\nThe main changes in this version, compared to Version 1, are:\n\n* A new naming structure for API endpoints\n* Changes to the JSON data structures\n* Changes to parameters and their names\n* More comprehensive documentation\n* Better error messages\n\nThe root endpoint for Version 1 was `/api/v1`, this has changed to\n`/api/v2/documents`.\n\nMost of the parameters have had minor name changes to make it easier for\nnewcomers to use.\nHowever, the parameters for the `/list` call have undergone significant\nstructural changes.\n\n\n\n* The Document JSON structure has changed, and fields have been renamed\n* The list call returns the full Document JSON for all documents, make sure\n you include `gzip` in your `Accept-Encoding` header to avoid large\n response sizes.\n\nThe following table summarises the changes in naming of the API calls.\nFor details of the new parameters and JSON data structures, please consult\nthe documentation.\n\n| API endpoint in Version 1 (`/api/v1`) | Equivalent API endpoint in Version 2 (`/api/v2/documents`) |\n| ------------------------------------------------------------ | ----------------------------------------------------------- |\n| `/list` | `/list` |\n| `/createfromfile` | `/new` |\n| `/createfromtemplate/$template_id$` | `/newfromtemplate/{template_id}` |\n| `/changemainfile/$documentid$` | `/{document_id}/setfile` |\n| `/update/$documentid$` | `/{document_id}/update` |\n| `/ready/$documentid$` | `/{document_id}/start` |\n| `/cancel/$documentid$` | `/{document_id}/cancel` |\n| `/get/$documentid$` | `/{document_id}/get` |\n| `/delete/$documentid$` | `/{document_id}/trash` |\n| `/reallydelete/$documentid$` | `/{document_id}/delete` |\n| `/remind/$documentid$` | `/{document_id}/remind` |\n| `/setattachments/$documentid$` | `/{document_id}/setattachments` |\n| `/downloadmainfile/$documentid$/$any_name$.pdf` | `/{document_id}/files/main/{filename}` |\n| `/downloadfile/$documentid$/$fileid$/$any_name$.pdf` | `/{document_id}/files/{file_id}/{filename}` |\n| `/changeauthenticationtoview/$documentid$/$signatorylinkid$` | `/{document_id}/{signatory_id}/setauthenticationtoview` |\n| `/changeauthentication/$documentid$/$signatorylinkid$` | `/{document_id}/{signatory_id}/setauthenticationtosign` |\n\n# Quick Start\nTo get started using our API it is recommended to first read the\n[Introduction](#introduction), this will give you an overview of some key\nconcepts in use by the Scrive eSign system.\n\nOnce you are familiar with the basic concepts the simplest document workflow\ncan be achieved by:\n\n1. Creating a new document using `api/v2/documents/new`\n (see [New Document](#new-document))\n2. Updating the document with the desired process options and signatory\n details using `api/v2/documents/{document_id}/update`\n (see [Update a document](#update-a-document))\n3. Start the signing process with `api/v2/documents/{document_id}/start`\n (see [Start the signing process](#start-the-signing-process))\n\n# Introduction\nScrive eSign is a system for signing documents electronically.\n\nUsers need to create an account with Scrive to create and send Documents,\nbut recipients do not need to have an account.\n\nDocuments in the Scrive eSign system define the parties to the document,\nincluding the information these parties parties should fill out, the\ndocument workflow, such as delivery and authentication for the parties, and\nmany other features related to the E-signing of documents as provided by\nScrive.\n\nThe Scrive Document API uses the Document JSON data structure to represent\nDocuments in the Scrive eSign system.\nThese always include an array of `parties`, which are either signing or\nnon-signing parties to the document, and represent the workflow assigned to\nthat party, and their individual information.\nThese use the Signatory JSON data structure.\n\nWe will first talk about the Document JSON, followed by the Signatory JSON.\nFor the reference documentation about these data structures please see the\n[Definitions](#definitions).\n\n## Documents\nA core data structure used throughout the API is the Document JSON.\nThe Document JSON is used to create documents, define the workflow for\nsigning and non-signing parties, monitor the progress of the document, etc.\n\nA key property of a document is its `status` (as defined by\n[DocumentStatus](#document-status)).\n\nNewly created documents have `status: \"preparation\"` and can be easily\nmodified.\nMost changes to the Document at this stage are done using the Document\n`update` API call, by passing a Document JSON with values updated as\nnecessary.\nNot all fields can be updated in this way.\nFor example, the Document’s `id` is auto-generated and cannot be changed.\nFor details of which fields cannot be updated in this way, look for the\n`readOnly` property in the Document [Definitions](#definitions).\n\nOnce the document signing process has been started, using the `start` API\ncall, the `status` will change to `\"pending\"` and relatively few\nmodifications by the author are possible.\nMaking the `start` API call will also deliver the document to the parties,\ndepending on the delivery methods set (e.g. by email or SMS).\n\nAfter all signing parties have successfully signed the document, its status\nwill change to `\"closed\"`, after which it cannot be modified.\n\nA pending document can also be cancelled by the author using the `cancel`\nAPI call, or rejected by a signing party, resulting in its status being\n`\"cancelled\"` or `\"rejected\"`, respectively.\n\nAny actions performed by parties to a document, such as signing, can only\nbe performed in the web application interface.\nWe will not provide an API for such actions.\n\n**The following diagram provides a rough overview of the document lifecycle:**\n\"Document\n\nPlease refer to `Document` in the [Definitions](#definitions) for a\ndetailed description of all the fields available, and their use.\n\n## Templates\nIt is possible to set up template documents to be used with the \"new\ndocument from template\" API call.\n\nAny document in preparation can be made into a template by executing an\nupdate call and setting the `\"template\"` field to be `true`. This cannot be\nreversed once set, and templates cannot direclty be made into documents for\nsigning.\n\nTemplates have the same JSON structure as regular documents and can also be\nupdated.\nIn particular, their `\"id\"` can be used to\n[create a new document from a template](#new-document-from-template).\nUpdating a template will only affect documents created from a template\n*after* the template was updated.\n\nFinally, using the list call, it is possible to list all your available\ntemplates by setting the appropriate filters.\n\n## Parties\nEvery Document has an array field named `parties`.\nThis defines the signing and viewing parties to a document, their details,\nhow the document is to be delivered to them, an extra authentication that\nmust be performed, etc.\n\nIt is possible to add an extra party to a Document in preparation using the\n`update` call.\nSimply add an extra empty object (*i.e.* `{ }`) to the list of existing\nparties and the Scrive API will return an additional party populated using\ndefault values.\n\nEach party has a unique `id`, which we refer to as the `signatory_id`.\nAs with Documents, not all fields may be changed using the `update` call.\n\nFor details of this data structure, please refer to `Signatory` in the\n[Definitions](#definitions).\n\n## Callbacks\nThe Scrive eSign system can trigger API callbacks when some significant\nproperty of a Document changes, as for example, when a signing party signs\nthe Document.\n\nFor callbacks to be triggered, you need to set the `api_callback_url` value\non the Document.\nYou can also trigger callbacks manually using the `callback` API call (this\ncall has no effect if the `api_callback_url` is not set).\n\nFor certain use cases it is possible to instead have a \"User callback\nscheme\" defined.\nYou will need to contact us to set this up, and setting callbacks on\nDocuments is the preferred solution.\n\nThe Scrive eSign system will perform an `HTTP POST` request, with the\nfollowing `POST` parameters:\n\n* `document_id`: As the name implies, the unique Document ID\n* `document_json`: The Document JSON, see [Definitions](#definitions)\n* `document_signed_and_sealed`: A boolean `true` or `false`, which indicates\n whether the document has been signed and sealed with a digital signature\n\nThere will generally be two callbacks executed with\n`document_signed_and_sealed` set to `true`.\nThe first will be shortly after all signing parties have signed the document\nand Scrive has applied a digital signature, and the second will be\nissued when a keyless signature has been applied to the document.\nThis usually happens between 15-30 days after the original signing date.\n\nWe guarantee to make *at least* one callback when the Document status\nchanges to one of the following values:\n\n* `pending`\n* `closed`\n* `canceled`\n* `timedout`\n* `rejected`\n\nWe cannot guarantee to make only one callback per status change, and we may\ntrigger callbacks for changes not listed here.\nFurthermore, a callback does not indicate _what_ changed in a document, it\nsimply tells you the current state of a document.\nFinally, callbacks will not be triggered for documents that have been\ndeleted.\n\nThe Scrive eSign system will look at the HTTP response code returned by the\ncallback URL.\nIf it is not an HTTP `2xx` response, then the callback will be retried in\nincreasing intervals, the first after 5 minutes.\nAfter 10 failed attempts, we will no longer attempt the callback.\n\nWe may modify the specifics of this behaviour without notice.\n\n# Authentication\nThe Scrive Document API supports OAuth 1.0 and personal access credentials\nbased on this.\n\nWhere your application needs to perform actions on behalf of Users, the\nrecommended approach is to use the full OAuth workflow.\n\n## Personal Access Credentials\n> You can retrieve personal access credentials for a user account using a\n> special endpoint and supplying their login details.\n>\n> Using cURL, you can do:\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/getpersonaltoken' \\\n --data-urlencode 'email={user_email}' \\\n --data-urlencode 'password={user_password}'\n```\n\n> Replacing `{server_address}`, `{user_email}` and `{user_password}` to\n> the appropriate values.\n>\n> Or, if you are using the `login_token` method:\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/getpersonaltoken' \\\n --data-urlencode 'login_token={login_token}'\n```\n\n> Replacing `{server_address}`, `{login_token}` to the appropriate values.\n>\n> These two methods will both return the personal access tokens as a JSON:\n\n```json\n{\n \"apitoken\" : \"987dfsd312sd76sh_123\"\n, \"apisecret\" : \"c47b87126dsacbhb\"\n, \"accesstoken\" : \"2d1287dassg22jke_114\"\n, \"accesssecret\" : \"12876adsdhght665\"\n}\n```\n\n> Then, given the following example personal access credentials:\n>\n> * Client credentials identifier:\n> `apitoken = 123`\n> * Client credentials secret:\n> `apisecret = abc`\n> * Token credentials identifier:\n> `accesstoken = 456`\n> * Token credentials secret:\n> `accesssecret = cde`\n>\n> The following authorisation header can be used:\n>\n> `Authorization: oauth_signature_method=\"PLAINTEXT\", oauth_consumer_key=\"123\", oauth_token=\"456\", oauth_signature=\"abc&cde\"`\n\nInstead of OAuth, clients may access the Scrive API using personal access\ncredentials.\nA user can create personal access credentials in the [Scrive Account\nSection](https://scrive.com/account#api-dashboard) through the web\ninterface, or using a dedicated API call, as described in the right column.\n\nOnly one personal token is available per user.\nSuch credentials can be used instead of OAuth client and token credentials\nin API calls.\nThe personal access credentials are associated with the user and can be\nused instead of any other OAuth privileges, they are intended for special\ncases where OAuth is not a viable option, or for getting started quickly in\na sandbox environment.\n\nThere are two ways to use this endpoint. One is to provide the username and\npassword of the user you are creating the personal access credentials for.\nThe other is to provide a `login_token`. These are temporary tokens created\nby the `gettokenforpersonalcredentials` endpoint. These are demonstrated in\nthe sidebar.\n\n\n\n## OAuth\n\nManaging API access is done through a Scrive user account, and each user\naccount may have zero or more client credentials.\nThese client credentials are managed in the [Integration settings\ntab](https://scrive.com/account#api-dashboard) of the user account\nsettings.\n\nThese client credentials may be used to request privileges from users.\nUsers, in turn, can approve or deny granting such privileges.\nThey may also remove privileges as they see fit, from the Integration\nsettings tab.\n\nThe OAuth authorisation sequence allows you to request privileges from a\nuser and retrieve token credentials.\nOnce these have been approved, you may use the token credentials to make\nAPI requests on behalf of the user.\n\n### OAuth privileges\nThe current API version accepts the following privileges names:\n`DOC_CREATE`, `DOC_CHECK`, and `DOC_SEND`.\n\nPermission levels required for each API call are described on a per call\nbasis.\n\n### OAuth and Cookies\nAs the Scrive eSign web interface uses the Scrive API, all API calls\nsupport two modes of authentication: OAuth based, and browser cookie based.\nIf the `Authorization` header is set, any browser cookies are ignored.\n\n### OAuth 1.0 Workflow\n> ### OAuth Workflow using cURL\n> Here we provide some examples using the cURL command.\n>\n> **1. Temporary credentials request using cURL and response:**\n\n```bash\n$ curl 'https://${host}/oauth/temporarycredentials?privileges=DOC_CREATE%2BDOC_SEND' \\\n -H 'Authorization: oauth_realm=\"Scrive\",oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"4d224b89875b39af_2\",oauth_signature=\"f446cae781995b05&aaaaaa\",oauth_callback=\"http://www.mywebsite.com/scrive\"'\n\noauth_token=b0d6be3270a2b3ad_8&oauth_token_secret=dac0ec76e037c01d&oauth_callback_confirmed=true\n```\n\n> **2. Now redirect the user to:**\n\n```\nhttps://${host}/oauth/authorization?oauth_token=b0d6be3270a2b3ad_8\n```\n\n> If the user grants access to your application, they will be redirected to:\n\n```\nhttp://www.mywebsite.com/scrive?=&oauth_token=b0d6be3270a2b3ad_8&oauth_verifier=6382be3e8fcafd94\n```\n\n> **3. You should now request for an OAuth token using all the information:**\n\n```\n$ curl '${host}/oauth/tokencredentials' \\\n -H 'Authorization: oauth_realm=\"Scrive\",oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"4d224b89875b39af_2\",oauth_signature=\"f446cae781995b05&dac0ec76e037c01d\",oauth_token=\"b0d6be3270a2b3ad_8\",oauth_verifier=\"6382be3e8fcafd94\"'\n\noauth_token=0e870aa5ff434d5a_2&oauth_token_secret=22adb49346ba7674\n```\n\n> You should now be able to perform an API call, for example:\n\n```\ncurl -X POST '${host}/api/v2/documents/new' \\\n -H 'Authorization: oauth_realm=\"Scrive\",oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"4d224b89875b39af_2\",oauth_signature=\"f446cae781995b05&22adb49346ba7674\",oauth_token=\"0e870aa5ff434d5a_2\"'\n```\n\nThe OAuth workflow consists of three steps, which we will describe in turn:\n\n1. Temporary credentials request and response\n2. Authorisation redirect\n3. Token request and response\n\n**1. Temporary Credentials**\n\nYou must first request temporary credentials using the client credentials\nidentifier and secret from your account’s [Integration settings\ntab](https://scrive.com/account#api-dashboard).\n\nTo do so you must issue a `GET` request to\n`https://${host}/oauth/temporarycredentials?privileges=${privileges}` with\nthe following parameters in the `authorization` header:\n\n* `oauth_signature_method=\"PLAINTEXT\"`\n* `oauth_consumer_key=\"${consumer_key}\"`\n* `oauth_signature=\"${consumer_secret}&aaaaaa\"`\n* `oauth_callback=\"${oauth_callback_url}\"`\n\n`${privileges}` must be separated by a `+`, for example\n`\"DOC_CREATE+DOC_SEND\"` (or `%2B` when URL encoded).\nYou can set `${oauth_callback_url}` to what you like, but it must be set.\nThe `oauth_signature` must be appended with a dummy `&aaaaaa` at this\nstage, it will be replaced with other tokens later.\n\nThe reponse should include an `oauth_token`, `oauth_token_secret`, and\n`oauth_callback_confirmed=true`.\n\n**2. Authorisation redirect**\n\nYou must now redirect the User to\n`https://${host}/oauth/authorization?oauth_token=${oauth_token}` using the\n`oauth_token` from the previous step.\n\nThe user will be asked to grant you the requested privileges, displaying\nyour company name.\n\nIf they accept, they will be redirected to:\n\n* `${oauth_callback}?=&oauth_token=${oauth_token}&oauth_verifier=${oauth_verifier}`\n\nIf they reject, the redirection will be to:\n\n* `${oauth_callback}?=&oauth_token=${oauth_token}&denied=true`\n\nTherefore, you should be able to inspect the redirection to the callback\nURL.\n\n**3. Token request**\n\nNow you should have the following pieces of information:\n\n* `oauth_consumer_key`\n* `oauth_token`\n* `oauth_verifier`\n\nWe then use `oauth_signature_method=\"PLAINTEXT\"` and construct a new\n`oauth_signature` from the client credentials secret and temporary\ncredentials secret:\n\n* `oauth_signature_method=\"PLAINTEXT\"`\n* `oauth_signature=\"${consumer_secret}&${oauth_token_secret}\"`\n\nFinally, we wrap all of this into the `Authorization` header to\n`https://${host}/oauth/tokencredentials` and get back an `oauth_token` and\n`oauth_token_secret`.\n\nWe can now make API calls on behalf of the User by including the finalised\ntokens in the `Authorization` header:\n\n* `oauth_consumer_key`\n* `oauth_token`\n* `oauth_signature_method=\"PLAINTEXT\"`\n* `oauth_signature`\n\n# Errors\n\n> Error responses will contain a JSON response body, structured as follows:\n\n```plaintext\n{\n \"error_type\": \"$error_type$\"\n, \"error_message\": \"$error_message$\"\n, \"http_code\": $http_code$\n}\n```\n\n> For example:\n\n```json\n{\n \"error_type\": \"resource_not_found\"\n, \"error_message\": \"The resource was not found. A document with id $id$ was not found.\"\n, \"http_code\": 404\n}\n```\n\nScrive uses HTTP status codes to indicate the success or failure of an API\nrequest.\n\nHTTP response codes in the `2xx` range indicate that the API call completed\nsuccessfully.\nThe `4xx` range indicates an error, either due to missing, incomplete, or\nnot applicable information (e.g. missing or invalid parameters, invalid\nauthorisation, etc.).\n\nWhen a request is well formed, but does not satisfy necessary conditions,\nthen we will return a `409` code.\nFor example, when trying to start the signing process for a document that\nhas already been signed.\n\nCodes in the `5xx` range suggest an error with Scrive’s eSign system, they\ncould also indicate planned system downtime, and will be rare.\n\nThe following table of error responses applies to all API calls, there may\nbe additional errors which are specific to the respective API calls, but\nwill follow the same structure.\n\n\n\n \n\n\n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n\n\n
HTTP code Reason Error Type and Message
400 Bad RequestObligatory parameters were missing\n

request_parameters_missing

\n

\n The parameter(s) $bad_parameters$ were missing.\n Please refer to our API documentation.\n

\n
400 Bad RequestParameter(s) could not be parsed\n

request_parameters_parse_error

\n

\n The parameter(s) $bad_parameters$ could not be parsed.\n Please refer to our API documentation.\n

\n

\n Some debugging information may also be present, detailing why\n parsing failed.\n

\n
400 Bad RequestParameter(s) were present and could be parsed, but were not valid.\n

request_parameters_invalid

\n

\n Error message should detail what is wrong with the parameter(s).\n

\n
401 UnauthorisedNo or invalid access credentials\n

invalid_authorisation

\n

\n No valid access credentials were provided.\n Please refer to our API documentation.\n

\n
403 ForbiddenInsufficient access privileges for request\n

insufficient_privileges

\n

\n The access credentials provided do not have sufficient privileges\n for this request.\n

\n
403 ForbiddenUser doesn’t have permission for a document action or retrieval\n

document_action_forbidden

\n

\n You do not have permission to perform this action on the document.\n

\n
404 Not FoundNon existent API endpoint\n

endpoint_not_found

\n

\n The endpoint was not found.\n See our website for API documentation.\n

\n
404 Not FoundThe endpoint exists but the resource was not found.\n

resource_not_found

\n

\n The resource was not found.\n

\n

\n We will try to give additional information about what is missing.\n

\n
409 ConflictThe document’s object_version does not match\n

document_object_version_mismatch

\n

\n The document has a different object_version to the one\n provided and so the request was not processed.\n

\n
500 Server ErrorOther unexpected server error\n

server_error

\n

\n We encountered an unexpected error.\n Please contact Scrive support and include as much details about\n what caused the error, including the document_id and\n any other details.\n

\n
\n\n\n\nWe recommend writing integration code that handles the possibility of the\nScrive eSign system returning errors.\n","version":"2.0.0","contact":{"name":"Scrive AB","url":"https://scrive.com/","email":"info@scrive.com"},"termsOfService":"In using this API you agree to be bound by the Scrive Terms of Service,\navailable at [http://scrive.com/en/terms](http://scrive.com/en/terms)\n","license":{"name":"All Rights Reserved"}},"host":"scrive.com","basePath":"/api/v2","schemes":["https"],"tags":[{"name":"Monitor"},{"name":"Prepare"},{"name":"Get"},{"name":"Modify"},{"name":"Sign"},{"name":"Attachment"},{"name":"User"},{"name":"Internal"}],"paths":{"/monitor/status":{"get":{"summary":"Get the system status","tags":["Monitor"],"description":"Check the system status, no API credentials required.\n","responses":{"200":{"description":"A simple JSON response with the system status:\n`{\"status\":\"ok\"}`\n\nAny other response implies there are system issues.\nWe may add more fields and more details in the future.\n"}}}},"/documents/new":{"post":{"summary":"New document","tags":["Prepare"],"description":"> ### Example\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/documents/new' \\\n -H 'Authorization: oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"${apitoken}\",oauth_token=\"${accesstoken}\",oauth_signature=\"${apisecret}&${accesssecret}\"'\n```\n\n> The above example uses [personal access credentials](#personal-access-credentials) (see `-H` option), but can be easily updated to use [OAuth](#oauth).\n\nCreate a new document with the given PDF (if any) as the main file.\nThe new document will have state `Preparation`, and will not be a template.\n\nIf no PDF is provided, you can set one using the `{document_id}/setfile`\nAPI call.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"file","in":"formData","type":"file","format":"application/pdf","required":false,"default":"No file","description":"**The PDF to use for the document.**\n\nIf supplied, the document’s title will be set to the filename (with the\nextensions removed).\nOtherwise a default document title will be set, depending on the user\nlanguage settings.\n"},{"name":"saved","in":"formData","type":"boolean","required":false,"default":true,"description":"Whether the document should start out as being \"saved\" (*i.e.* appear\nin the E-archive).\n\nThe document can be \"saved\" later, by setting the \"saved\" field to\n`true` via an `update` call.\nAll API operations are applied immediately, the \"saved\" flag simply\nrepresents visibility in the E-archive.\n"}],"responses":{"201":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The parameter `file` could not be parsed."}}}},"/documents/newfromtemplate/{document_id}":{"post":{"summary":"New document from Template","tags":["Prepare"],"description":"> ### Example\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/documents/newfromtemplate/${document_id}' \\\n -H 'Authorization: oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"${apitoken}\",oauth_token=\"${accesstoken}\",oauth_signature=\"${apisecret}&${accesssecret}\"'\n```\n\n> The above example uses [personal access credentials](#personal-access-credentials) (see `-H` option), but can be easily updated to use [OAuth](#oauth).\n\nCreate a new document from a template, given the document ID for a document that is a template.\n\nThe new document will have state `Preparation` and will not be a template, and the signing process can thus be carried out.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"201":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"The document is not a template."}}}},"/documents/{document_id}/clone":{"post":{"summary":"Clone a document","tags":["Prepare"],"description":"Clone an existing document, returning a new document in `Preparation`.\n\nYou can only clone documents for which you are the author, the new document\nwill use the current author details for the author signatory fields.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"201":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}}}}},"/documents/{document_id}/update":{"post":{"summary":"Update a document","tags":["Prepare"],"description":"> ### Example\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/documents/${document_id}/update' \\\n -H 'Authorization: oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"${apitoken}\",oauth_token=\"${accesstoken}\",oauth_signature=\"${apisecret}&${accesssecret}\"' \\\n --data-urlencode 'document={ \"id\":\"${document_id}\", \"parties\": [{}] }' \\\n --data-urlencode 'document_id=${document_id}'\n```\n\n> The above example uses [personal access credentials](#personal-access-credentials) (see `-H` option), but can be easily updated to use [OAuth](#oauth).\n\nUpdate the metadata for a document in preparation.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"document","in":"formData","type":"string","format":"application/json","required":true,"description":"**The document metadata**\n\nMust be of type `Document`, see [Definitions](#definitions).\n\nCan be a subset of the JSON structure, for example it is possible to\njust update the title of a document with `{\"title\": \"New title\"}`.\n\nNot all fields can be set this way, please refer to the definitions for\ndetails, those marked as read-only cannot be modified using this API\ncall.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"The document status should be `Preparation`."}}}},"/documents/{document_id}/setfile":{"post":{"summary":"Set the Main File","tags":["Prepare"],"description":"Set or replace the main PDF file for a document in `Preparation`.\n\nIf the `file` parameter is blank, the main file for the document will be\nremoved (if any).\n\n_A note about anchors:_\nSignatory field placements with anchors are only recalculated if a main file\nwas already set on the document, as it requires the relative placement in\noriginal file to recalculate placements for the new file.\nContact us to learn more about anchors, and discuss advanced features that\nwe may be able to offer you.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"file","in":"formData","type":"file","format":"application/pdf","required":false,"description":"If provided, the PDF will be set as the main file for the document.\n\nIf not provided, the current main file for the document will be removed.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The parameter `file` could not be parsed."},"409":{"description":"The document status should be `Preparation`."}}}},"/documents/{document_id}/setattachments":{"post":{"summary":"Set Author Attachments","tags":["Prepare"],"description":"> ### Example\n>\n> As this call can be a little tricky to understand, we provide a concrete\n> example.\n>\n> Suppose we wanted to set two author attachments:\n>\n> 1. `terms_and_conditions.pdf`\n> 2. `proof_of_purchase.pdf`\n>\n> To do this we would need to include the two files as form data in our\n> request.\n> We are then free to chose names for the form data elements, so suppose we\n> chose `toc_file` for the first, and `proof_file` for the second.\n>\n> In this case the `attachments` JSON would need to resemble:\n\n```json\n[\n {\n \"name\": \"Terms and Conditions\",\n \"required\": true,\n \"add_to_sealed_file\": false,\n \"file_param\": \"toc_file\"\n },\n {\n \"name\": \"Proof of purchase\",\n \"required\": false,\n \"add_to_sealed_file\": true,\n \"file_param\": \"proof_file\"\n }\n]\n```\n\n> And we would include our files as named form elements.\n\nSet or remove author attachments for the document.\n\nBy default, it replaces any existing attachments, so all attachments must be\nset by any use of this call. See the parameter `incremental` to change this\nbehaviour.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"attachments","in":"formData","type":"string","format":"application/json","required":true,"description":"**List of author attachments.**\n\nThe list provided will replace any existing attachments (if any).\nTherefore, to add an attachment to an existing list, you would need to\nfirst fetch the existing attachments `file_id` and use it for this\ncall.\n\n**Note:** The JSON structure has two variants, one with `file_param` and\nthe other with `file_id`.\n\n* `file_param` refers to a named parameter that must also be included\n in this API call.\n This is the suggested way to include files.\n\n* `file_id` refers to a file in the Scrive system.\n You must have the rights to access the `file_id` to use it.\n\nMust be of type [Author Attachments](#author-attachments).\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Author Attachments","description":"Attachments that have been added to a document by the author.","type":"array","items":{"anyOf":[{"type":"object","required":["name","required","add_to_sealed_file","file_param"],"description":"Attachment that is uploaded as part of the API call.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"add_to_sealed_file":{"type":"boolean","description":"Whether to add the attachment to the sealed file after signing\n"},"file_param":{"type":"string","description":"The parameter name used in the API call for this attachment.\n"}}},{"type":"object","required":["name","required","add_to_sealed_file","file_id"],"description":"Attachment that references a `file_id`.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"add_to_sealed_file":{"type":"boolean","description":"Whether to add the attachment to the sealed file after signing\n"},"file_id":{"type":"integer"}}}]},"example":[{"name":"Attachment using ID","required":false,"add_to_sealed_file":true,"file_id":"36"},{"name":"Attachment using parameter","required":false,"add_to_sealed_file":true,"file_param":"file_1"}]}},{"name":"{attachment_name}","in":"formData","type":"file","format":"application/pdf","description":"**The named file parameters**\n\nAny `file_param` in the `attachments` JSON must be supplied as named\nfile parameters.\n\nIf converting from API version 1, it is convenient to name these\nparameters `attachment_1`, `attachment_2`, etc, and reference them as\nsuch in the `attachments` JSON.\nAlthough it is possible to use any HTTP compatible naming scheme.\n"},{"name":"incremental","in":"formData","type":"boolean","default":false,"description":"If set to `true`, this will make the API set the given author\nattachments leaving all already set attachments intact.\n\nFor each given attachment, if there already is one with the same name,\nit will get overwritten, otherwise, the attachment will be added.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"The document status should be `Preparation`."}}}},"/documents/{document_id}/removepages":{"post":{"summary":"Remove pages","tags":["Prepare"],"description":"Remove some pages from main PDF file of a document in `Preparation`.\n\nCheckboxes and signature areas that are placed on pages to be removed will\nbe removed from their respective signatory.\nFor standard and text fields, only the placements that are on the pages to\nbe removed will be removed, the signatory field will still exist.\nAs a consequence of removing pages, the `page` property of any placements\nmay change to account for any removed pages.\n\nThis operation will update the document’s `file` with a new one, that will\nhave the requested pages removed from its current main file.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"pages","in":"formData","type":"array","items":{"type":"integer"},"format":"[integer]","required":true,"description":"List of pages to be removed. Pages are indexed from 1.\n\nTo remove the first and last page, when the main file has 4 pages, set\nthis param to `[1,4]`.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"Parameter `pages` could not be parsed or given `pages` can't be removed from PDF:\n\n* Parameter `pages` could not be parsed.\n* Pages parameter can't have more then 100 positions.\n* Pages parameter can't be an empty list.\n* Pages parameter can't contain duplicates.\n* Some page indexes lower then 1 or higher then number of pages.\n* Can't remove all pages from PDF.\n"},"409":{"description":"`document_state_error` with error messages:\n\n* The document status should be `Preparation`.\n* Document does not have a main file.\n"}}}},"/documents/{document_id}/start":{"post":{"summary":"Start the signing process","tags":["Prepare"],"description":"> ### Example\n\n```bash\ncurl -X POST 'https://{server_address}/api/v2/documents/${document_id}/start' \\\n -H 'Authorization: oauth_signature_method=\"PLAINTEXT\",oauth_consumer_key=\"${apitoken}\",oauth_token=\"${accesstoken}\",oauth_signature=\"${apisecret}&${accesssecret}\"' \\\n --data-urlencode 'document_id=${document_id}'\n```\n\n> The above example uses [personal access credentials](#personal-access-credentials) (see `-H` option), but can be easily updated to use [OAuth](#oauth).\n\nStart the signing process for a document in preparation.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"author_signs_now","x-internalOnly":true,"in":"formData","type":"boolean","required":false,"default":false,"description":"**Internal use only.**\n\nSetting to ‘true’ will result in no invitation to sign being sent to the\nauthor.\nThis is useful for when the author signs immediately after the ‘start’\ncall.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"`document_state_error` with error messages:\n\n* The document state must be 'Preparation'.\n* Document is a template, templates can not be started.\n* Document must have a file before it can be started.\n* The document has missing or invalid data. Some information about what\n is missing or invalid in the document is given.\n"}}}},"/documents/{document_id}/get":{"get":{"summary":"Get a document","tags":["Get"],"description":"Get the JSON metadata for a given `document_id`.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}}}}},"/documents/{short_document_id}/getbyshortid":{"get":{"summary":"Get by short ID","tags":["Get"],"description":"**Get the Document JSON metadata using a short Document ID.**\n\nThis can only be used for documents created within the last 72 hours.\nIt can only be used for documents that are pending.\nYou can only get documents that you have access to.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"short_document_id","in":"path","required":true,"description":"Last 6 digits of a regular Document ID.\nMust be a pending document created within the last 72 hours.\n","type":"integer","format":"int64"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The parameter `short_document_id` had the following problems: was\ngreater than 6 digits\n"},"404":{"description":"The resource was not found. A document matching short id\n`short_document_id` was not found\n"}}}},"/documents/{document_id}/{signatory_id}/getqrcode":{"get":{"summary":"Get a sign link as a QR code","tags":["Get"],"description":"Get a Scrive eSign link for a given signatory and document ID, encoded as a\nQR code in PNG format. Only valid for pending documents.\n\nThe encoded link is of the form\n`scrive://{hostname}/{document_id}/{signatory_id}/{token}` and is intended\nto be used with our mobile applications available on the Apple App Store\nand Google Play Store.\n\nThis endpoint will work irrespective of the delivery method set.\nIt will also work for viewing parties.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"}],"responses":{"200":{"description":"PNG image, `content-type: image/png`.\n"},"409":{"description":"`document_state_error` with message _The document state must be\n'Pending'_.\n"}}}},"/documents/list":{"get":{"summary":"List documents","tags":["Get"],"description":"Fetch a list of documents, with filtering and sorting options.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"offset","in":"query","type":"integer","format":"int32","minimum":0,"required":false,"default":0,"description":"**Starting offset for documents to return.**\n\nIf offset is larger than the total number of matching documents, an\nempty list is returned.\n"},{"name":"max","in":"query","type":"integer","format":"int32","minimum":1,"required":false,"default":100,"description":"**Maximum number of documents to return.**\n\nServer may cap to a lower value.\n\nDefault value may change without notice.\n"},{"name":"filter","in":"query","type":"string","format":"application/json","required":false,"default":"[]","description":"**List of filtering options.**\n\nYou can supply a list of filtering options to apply.\nOnly documents that match **all** filters will be returned.\nTherefore, it is easy to apply a set of filters that will return no\ndocuments.\n\nIf not supplied, the default is not to apply any filter, i.e. `[]`.\n\nMust be of type [List Filter](#list-filter), for example:\n\n`[ { \"filter_by\":\"status\", \"statuses\": [\"preparation\",\"pending\"] } ]`\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"List Filter","description":"Parameter used to filter documents for the `list` API call.","type":"array","default":[],"example":[{"filter_by":"status","statuses":["preparation","pending"]}],"items":{"anyOf":[{"title":"Filter by status","type":"object","properties":{"filter_by":{"type":"string","enum":["status"]},"statuses":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"type":"array"}}},{"title":"Filter by mtime","type":"object","properties":{"filter_by":{"type":"string","enum":["mtime"]},"start_time":{"format":"date-time","type":"string"},"end_time":{"format":"date-time","type":"string"}}},{"title":"Filter by tag","type":"object","properties":{"filter_by":{"type":"string","enum":["tag"]},"value":{"type":"string"},"name":{"type":"string"}}},{"title":"Filter by author","description":"Only include documents where the person making the API call is the\ndocument author.\n","type":"object","properties":{"filter_by":{"type":"string","enum":["is_author"]}}},{"title":"Signable on pad","description":"This implicitly adds an `is_author` filter.\n","type":"object","properties":{"filter_by":{"type":"string","enum":["is_signable_on_pad"]}}},{"title":"Only templates","type":"object","properties":{"filter_by":{"type":"string","enum":["is_template"]}}},{"title":"Only non-templates","type":"object","properties":{"filter_by":{"type":"string","enum":["is_not_template"]}}},{"title":"In trash","type":"object","properties":{"filter_by":{"type":"string","enum":["is_in_trash"]}}},{"title":"Not in trash","type":"object","properties":{"filter_by":{"type":"string","enum":["is_not_in_trash"]}}},{"title":"Filter by author id","type":"object","properties":{"filter_by":{"type":"string","enum":["author"]},"user_id":{"type":"string"}}},{"title":"Signable by user","type":"object","properties":{"filter_by":{"type":"string","enum":["user_can_sign"]},"user_id":{"type":"string"}}},{"title":"Filter by text","type":"object","properties":{"filter_by":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}}},{"name":"sorting","in":"query","type":"string","format":"application/json","required":false,"default":"[ { \"sort_by\":\"mtime\", \"order\":\"descending\" } ]","description":"**List of sorting options.**\n\nYou can supply a list of sorting options, which will be applied to list\nof documents in the order you provided.\n\nIf not supplied, the default is\n`[ { \"sort_by\":\"mtime\", \"order\":\"descending\" } ]`,\n*i.e.*, sort by modification time, newest first.\n\nMust be of type [List Sorting](#list-sorting).\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"List Sorting","description":"Parameter used to sort documents for the `list` API call.","type":"array","example":[{"sort_by":"author","order":"ascending"}],"items":{"type":"object","properties":{"order":{"default":"ascending","type":"string","enum":["ascending","descending"]},"sort_by":{"type":"string","enum":["title","status","mtime","author"]}},"required":["sort_by"]}}}],"responses":{"200":{"description":"A JSON object containing the total number of matching documents, and an\narray of documents.\n\nThe `total_matching` value is capped at 1,000 + `offset`.\nTherefore, further API calls will be needed with a higher `offset` if\nthe `total_matching` is 1,000.\n","schema":{"type":"object","properties":{"total_matching":{"type":"integer","minimum":0,"description":"Up to 1,000 + `offset`"},"documents":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}}}}}}}},"/documents/{document_id}/files/main/{filename}":{"get":{"summary":"Get the main file","tags":["Get"],"description":"**Get the main PDF file for a document.**\n\nThe optional `filename` parameter in the URL can be set to any valid file name.\nThis allows you to download the file with user-specified file name in the\nbrowser.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"formData","required":false,"x-internalOnly":true,"description":"**Internal use only**\n\nCan be supplied to authenticate as a specific signatory using session tokens.\n*i.e.* to get files from the signing page.\n","type":"integer","format":"int64"},{"name":"filename","in":"path","type":"string","required":false,"description":"Optional filename parameter.\n"}],"responses":{"200":{"description":"The PDF file."},"503":{"description":"Error message:\n_The sealed PDF for the document is not ready yet, please wait and try again._\n\nThis happens immediately after all signatories have signed (_i.e._\nDocument status is `closed`), as Scrive eSign is preparing the\nfinalised PDF.\nIt should not take more than ~10 seconds for the finalised PDF to be\navailable.\n"}}}},"/documents/{document_id}/files/{file_id}/{filename}":{"get":{"summary":"Get a related file","tags":["Get"],"description":"**Get a file related to a document.**\n\nThis can be used to get author or signatory attachments by looking up their\nrespective `file_id` the Document JSON.\n\nThe optional `filename` parameter in the URL can be set to any valid file name.\nThis allows you to download the file with user-specified file name in the\nbrowser.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"file_id","in":"path","required":true,"description":"Unique identifier for a file available via Scrive.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"formData","required":false,"x-internalOnly":true,"description":"**Internal use only**\n\nCan be supplied to authenticate as a specific signatory using session tokens.\n*i.e.* to get files from the signing page.\n","type":"integer","format":"int64"}],"responses":{"200":{"description":"The file\n\nUsually an image (JPG, PNG) or PDF, but this may change.\n`Content-Type` header will be set according to the file type.\n"}}}},"/documents/{document_id}/texts/{file_id}":{"get":{"summary":"Extract text","tags":["Get","Internal"],"description":"Extract text from the main file of a document.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"json","in":"formData","type":"string","format":"application/json","required":true,"description":"A JSON representation of rectangles to extract text from.\n\nFor example:\n`{\"rects\": [ { \"rect\": [0,0,1,1], \"page\": 1} ] }`\n\nPlease see JSON Schema definition for exact details.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"FileRects","type":"object","properties":{"rects":{"type":"array","items":{"type":"object","properties":{"rect":{"type":"array","items":{"type":"integer"},"required":[0,1,2,3]},"page":{"type":"integer"}},"required":["rect","page"]}},"required":["rects"]}}}],"responses":{"200":{"description":"A JSON representation of the extracted data.\n\nPlease see the JSON Schema definition for full details.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"FileRectsResult","type":"object","properties":{"rects":{"type":"array","items":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"}},"page":{"type":"integer"},"rect":{"type":"array","items":{"type":"integer"},"required":[0,1,2,3]}},"required":["lines","page","rect"]},"required":[0]}},"required":["rects"]},"examples":{"application/json":{"rects":[{"lines":["A line from the PDF","Another PDF line!","That’s it really!"],"page":1,"rect":[0,0,1,1]}]}}}}}},"/documents/{document_id}/history":{"get":{"summary":"Get the Document History","tags":["Get"],"description":"**Get the document history to display to the user.**\n\nDefault language for the document history text is the one set for the user\nmaking the API call.\nThis can optionally be overridden.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"lang","in":"query","default":"User language","description":"**The language used to display the document history.**\n\nDefaults to the language of the User making the API call.\n\nHas to be a supported language code.\nLanguages may be added or removed without notice.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]}],"responses":{"200":{"description":"The list of history items for this document.\n\nWill be in reverse-chronological order and an array of\n[History Items](#history-items).\n","examples":{"application-json":{"events":[{"status":"initiated","time":"2015-06-06T17:50:15Z","party":"Not named party (1)","text":"The signing process was initiated."}]}},"schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"History Items","description":"The type returned by the Document History API call.\n\nThis can be used to show the progress of a document to the user.\n","type":"object","example":{"events":[{"status":"initiated","time":"2015-06-06T17:50:15Z","party":"Not named party (1)","text":"The signing process was initiated."}]},"properties":{"events":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["initiated","draft","cancelled","rejected","timeouted","problem","deliveryproblem","sent","delivered","read","opened","signed","prolonged","sealed","extended"],"description":"The document status \"class\", not the same as the statuses\navailable for documents.\n"},"time":{"format":"date-time","type":"string"},"text":{"type":"string","description":"The text describing the action."},"party":{"type":"string","description":"The name of the party performing the action."}}}}}}}}}},"/documents/{document_id}/evidenceattachments":{"get":{"summary":"Get the list of Evidence Attachments","tags":["Get","Internal"],"description":"Returns the list of evidence attachments for a document.\n\nNote that the returned list may be empty.\n\n*OAuth Privileges required: `DOC_CHECK`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"}],"responses":{"200":{"description":"The list of evidence attachments for the document.\n\nAs this call succeeds regardless of document status, the list may be\nempty.\n","examples":{"application-json":{"attachments":[{"name":"Appendix 1 Evidence Quality Framework.html","download_url":"/d/evidenceattachment/5/Appendix 1 Evidence Quality Framework.html"}]}},"schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"download_url":{"type":"string"}}}}}}}}}},"/documents/{document_id}/callback":{"post":{"summary":"Trigger an API callback","tags":["Get"],"description":"Explicitly trigger an extra API callback to the URL set for the document.\nIf one is set, no effect otherwise.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"202":{"description":"A callback will be triggered for the document if a User or Document\ncallback URL was set.\n"},"409":{"description":"Can not send callbacks for documents in Preparation."}}}},"/documents/{document_id}/remind":{"post":{"summary":"Remind signatories","tags":["Modify"],"description":"Send a reminder invitation message to all signatories that have not yet\nsigned.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"202":{"description":"The call succeeded, reminders have been queued and will be sent to all\nsignatories that have not yet signed.\n"},"409":{"description":"The document status should be `Pending`."}}}},"/documents/{document_id}/prolong":{"post":{"summary":"Prolong a document","tags":["Modify"],"description":"Prolong a document that has timed out.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"days","in":"formData","type":"integer","minimum":1,"maximum":90,"required":true,"description":"Number of days to prolong the document by."},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The `days` parameter must be a number between 1 and 90."},"409":{"description":"The document has not timed out.\nOnly timed out documents can be prolonged.\n"}}}},"/documents/{document_id}/cancel":{"post":{"summary":"Cancel a pending document","tags":["Modify"],"description":"Cancel a pending document.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"The document state is not `Pending`."}}}},"/documents/{document_id}/trash":{"post":{"summary":"Move a document to Trash","tags":["Modify"],"description":"**Note**: In API Version 2 `delete` and `trash` behave differently to Version 1.\n\nMove a document to Trash.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Pending documents can not be trashed or deleted."}}}},"/documents/trash":{"post":{"summary":"Move one or more documents to Trash","tags":["Modify"],"description":"Move one or more documents to Trash.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_ids","in":"formData","type":"string","format":"application/json","required":true,"description":"List of document IDs to trash.\n","schema":{"type":"array","default":[],"example":["3","4"],"items":{"type":"string"}}}],"responses":{"200":{"description":"A JSON object containing the total number of `trashed` documents, and an array of documents.\n"},"409":{"description":"Pending documents can not be trashed or deleted."}}}},"/documents/{document_id}/delete":{"post":{"summary":"Delete a document","tags":["Modify"],"description":"**Note**: In API Version 2 `delete` and `trash` behave differently to Version 1.\n\nDelete a document that is in Trash.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Pending documents can not be trashed or deleted."}}}},"/documents/delete":{"post":{"summary":"Delete one or more documents","tags":["Modify"],"description":"Delete one or more documents that are in Trash.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_ids","in":"formData","type":"string","format":"application/json","required":true,"description":"List of document IDs to delete.\n","schema":{"type":"array","default":[],"example":["3","4"],"items":{"type":"string"}}}],"responses":{"200":{"description":"A JSON object containing the total number of `deleted` documents, and an array of documents. \n"},"409":{"description":"Pending documents can not be trashed or deleted."}}}},"/documents/{document_id}/forward":{"post":{"summary":"Forward a document","tags":["Modify"],"description":"Forward a signed document to a third party.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"email","in":"formData","type":"string","required":true,"description":"The email address to forward the document to."},{"name":"no_content","in":"formData","type":"boolean","required":false,"default":true,"description":"When set to true only the signed document will be forwarded, with no\nother email content.\nOtherwise a template email content is used, with the document attached.\n"},{"name":"no_attachments","in":"formData","type":"boolean","required":false,"default":false,"description":"When set to true, only the main file will be included as email\nattachments.\nAny attachments not merged with the main file will not be sent.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"202":{"description":"The call succeeded, an email to the given address has been queued.\n"},"409":{"description":"The document status should be `Closed`."}}}},"/documents/{document_id}/setautoreminder":{"post":{"summary":"Set an auto-reminder","tags":["Modify"],"description":"Set the number of days in which to send an automatic invitation reminder\nmessage to the signatories that have not yet signed by that date.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"days","in":"formData","type":"integer","format":"int32","minimum":1,"required":false,"description":"Including this parameter sets the number of days in which to send\nautomatic reminders.\n\nExcluding it will remove automatic reminders from the document.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The `days` parameter must a number between 1 and the number of days left\nbefore the document expires.\n"},"409":{"description":"The document status should be `Pending`."}}}},"/documents/{document_id}/restart":{"post":{"summary":"Restart a document","tags":["Modify"],"description":"Restart a document that has been cancelled, timed out, or rejected.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"201":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Documents that are in Preparation, Pending, or Closed can not be\nrestarted.\n"}}}},"/documents/{document_id}/{signatory_id}/setauthenticationtoview":{"post":{"summary":"Set the signatory authentication-to-view method","tags":["Modify"],"description":"Set the signatory authentication-to-view method after the document has been\nstarted.\n\n*Side effects of this operation may include adding or modifying fields for the signatory.*\n\nFor example, if the signatory does not have a field for personal number,\nthen setting the authentication method to Swedish BankID will necessitate\nadding the field to the signatory with a valid personal number.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"authentication_type","in":"formData","type":"string","enum":["standard","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi"],"required":true,"description":"The type of authentication-to-view method to set for the signatory.\n"},{"name":"personal_number","in":"formData","type":"string","required":false,"description":"If the `authentication_type` requires a personal number, and the\nsignatory doesn’t have one set already, then it must be provided and\nvalid for the chosen authentication-to-view method.\n"},{"name":"mobile_number","in":"formData","type":"string","required":false,"description":"Can be used for `authentication_type` that makes use of a mobile\nnumber.\nSimilar requirements as `personal_number`.\n\nCurrently only Norwegian BankID uses this and therefore must be a valid\nNorwegian mobile number.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Possible error responses:\n\n* `document_state_error`: The document status should be 'Pending'.\n* `signatory_state_error`: The signatory has already authenticated to view.\n* `signatory_state_error`: The signatory has already signed.\n* `signatory_state_error`: You can’t mix different e-legitimation\n providers (one for viewing and another for signing) for the same\n signatory.\n"}}}},"/documents/{document_id}/{signatory_id}/setauthenticationtosign":{"post":{"summary":"Set the signatory authentication-to-sign method","tags":["Modify"],"description":"Set the signatory authentication-to-sign method after the document has been\nstarted.\n\n*Side effects of this operation may include adding or modifying fields for the signatory.*\n\nFor example, if the signatory does not have a field for mobile number, then\nsetting the authentication method to SMS PIN will necessitate adding a\nmobile number field to the signatory and setting it as obligatory.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"authentication_type","in":"formData","type":"string","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"],"required":true,"description":"The type of authentication-to-sign method to set for the signatory.\n"},{"name":"personal_number","in":"formData","type":"string","required":false,"description":"If provided, it must be valid for the chosen authentication-to-sign\nmethod.\n\nIf it is not used by the chosen authentication-to-sign method, the\nparameter will be ignored and will have no effect.\n\nIf not provided, any existing `personal_number` field value set for the\nsignatory will not be changed.\nHowever, if a `personal_number` _SignatoryField_ does not yet exist,\none will be added to the signatory (with empty string as `value`).\n"},{"name":"mobile_number","in":"formData","type":"string","required":false,"description":"If provided, it must be valid for the chosen authentication-to-sign\nmethod.\n\nIf it is not used by the chosen authentication-to-sign method, the\nparameter will be ignored and will have no effect.\n\nIf not provided, any existing `mobile` field value set for the\nsignatory will not be changed.\nHowever, if a `mobile` _SignatoryField_ does not yet exist, one will be\nadded to the signatory (with empty string as `value`).\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Possible error responses:\n\n* `document_state_error`: The document status should be 'Pending'.\n* `signatory_state_error`: The signatory has already signed.\n* `signatory_state_error`: You can’t mix different e-legitimation\n providers (one for viewing and another for signing) for the same\n signatory.\n"}}}},"/documents/{document_id}/{signatory_id}/changeemailandmobile":{"post":{"summary":"Change the email and mobile number of a signatory","tags":["Modify"],"description":"Change the email address and mobile number of a signatory after the\ndocument has been started.\n\n**This API call is _meant_ to be used for correcting mistakes that may occur\nduring a manual document preparation process.**\n\nIf you are planning to use it programatically, please be aware that this\nwill result in extra invitation messages being sent, the old invitation\nlinks being invalidated, and may therefore not be the approach best suited\nto your use-case.\n\nYou will only be able to change values for fields that a signatory has.\nFor example, if they have no mobile field set, you will not be able to\nchange it.\n\n*OAuth Privileges required: `DOC_SEND`*\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"email","in":"formData","type":"string","required":false,"description":"The new email address for the signatory.\n\nWhilst this field is optional, both `email` and `mobile_number` cannot\nbe blank, you need at least one.\n"},{"name":"mobile_number","in":"formData","type":"string","required":false,"description":"The new mobile number for the signatory.\n\nWhilst this field is optional, both `email` and `mobile_number` cannot\nbe blank, you need at least one.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"Possible error responses:\n\n* `document_state_error`: The document status should be 'Pending'.\n* `signatory_state_error`: The signatory has already signed, is the\n author, or does not have a mobile or email field already.\n* `request_parameter_parse_error`: Can happen if the `email` or\n `mobile_number` is not in the correct format.\n* `request_parameter_missing`: If neither `email` nor `mobile_number`\n is provided.\n"}}}},"/documents/templates/setsharing":{"post":{"summary":"Share or unshare templates","tags":["Modify"],"description":"Share or unshare the specified templates with the company's other users.\n\n*OAuth Privileges required: `DOC_CREATE`*\n","parameters":[{"name":"document_ids","in":"formData","type":"string","format":"application/json","required":true,"description":"List of document IDs of templates to share or unshare.\n","schema":{"type":"array","default":[],"example":["3","4"],"items":{"type":"string"}}},{"name":"shared","in":"formData","type":"string","format":"application/json","required":true,"description":"`true` to share, `false` to unshare.\n"}],"responses":{"202":{"description":"The change has succeeded. The body is empty."}}}},"/documents/{document_id}/{signatory_id}/check":{"post":{"summary":"Check if a signatory can sign","tags":["Sign","Internal"],"description":"Check if a signatory `sign` call could succeed.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"internalUseOnly":true,"name":"fields","in":"formData","type":"string","format":"application/json","required":true,"description":"Updated information as entered by the signatory."},{"internalUseOnly":true,"name":"authentication_type","in":"formData","type":"string","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"],"description":"The authentication method to be used for signing.\n\nNot including this parameter will omit this check even though signing\nrequires it.\n"},{"internalUseOnly":true,"name":"authentication_value","in":"formData","type":"string","description":"If the `authentication_type` is not `standard`, then the value\nassociated with it (e.g. mobile number for `sms_pin`).\n"},{"internalUseOnly":true,"name":"sms_pin","in":"formData","type":"integer","description":"If the `authentication_method_to_sign` for the signatory is `sms_pin`\nthen SMS PIN also needs to be included.\n\nThis is independant of other parameters in this call.\n"},{"internalUseOnly":true,"name":"accepted_author_attachments","in":"formData","type":"array","items":{"type":"integer","format":"int64"},"required":true,"description":"The list of author attachments which the signatory has seen and\ntherefore accepted.\n\nThe call will fail if not all author attachments with `required` set to\n`true` are included here.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"A call to `{document_id}/{signatory_id}/sign` with the same parameters\nshould succeed.\n"},"400":{"description":"TODO"},"409":{"description":"TODO"}}}},"/documents/{document_id}/{signatory_id}/sign":{"post":{"summary":"Sign a document","tags":["Sign","Internal"],"description":"Sign a document for the given signatory.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"internalUseOnly":true,"name":"fields","in":"formData","type":"string","format":"application/json","required":true,"description":"Updated information as entered by the signatory."},{"internalUseOnly":true,"name":"authentication_type","in":"formData","type":"string","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"],"description":"The authentication method to be used for signing.\n\nNot including this parameter will omit this check even though signing\nrequires it.\n"},{"internalUseOnly":true,"name":"authentication_value","in":"formData","type":"string","description":"If the `authentication_type` is not `standard`, then the value\nassociated with it (e.g. mobile number for `sms_pin`).\n"},{"internalUseOnly":true,"name":"sms_pin","in":"formData","type":"integer","description":"If the `authentication_method_to_sign` for the signatory is `sms_pin`\nthen SMS PIN also needs to be included.\n\nThis is independant of other parameters in this call.\n"},{"internalUseOnly":true,"name":"accepted_author_attachments","in":"formData","type":"array","items":{"type":"integer","format":"int64"},"required":true,"description":"The list of author attachments which the signatory has seen and\ntherefore accepted.\n\nThe call will fail if not all author attachments with `required` set to\n`true` are included here.\n"},{"name":"screenshots","in":"formData","type":"string","format":"application/json","description":"The screenshots and/or reference screenshots to use for the Evidence of\nIntent as part of the Evidence Package.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"TODO"}}}},"/documents/{document_id}/{signatory_id}/reject":{"post":{"summary":"Reject signing a document","tags":["Sign","Internal"],"description":"Reject signing the document for the given signatory.\n\nIf successful, this will prevent any future signatories from signing and\nchange the document status to `rejected`.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"reason","in":"formData","type":"string","required":false,"default":"\"\"","description":"The reason for rejection as given by the signatory.\n\nNote that this value is ignored when `allow_reject_reason` in the\nDocument is set to `false`.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"409":{"description":"TODO"}}}},"/documents/{document_id}/{signatory_id}/sendsmspin":{"post":{"summary":"Send an SMS PIN","tags":["Sign","Internal"],"description":"Send an SMS PIN for the signatory to authenticate.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"mobile","in":"formData","type":"string","required":false,"description":"A mobile number to send the SMS PIN to.\n\nIf the mobile number is not set by the document author, then it must be\nprovided.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"202":{"description":"The call succeed.\nAn SMS PIN will be sent to the mobile number of the signatory.\n"},"409":{"description":"TODO"}}}},"/documents/{document_id}/{signatory_id}/setattachment":{"post":{"summary":"Set a signatory attachment","tags":["Sign","Internal"],"description":"Set a signatory attachment that was requested by the document author.\n\nThere can be multiple signatory attachments with different names,\nthough at most one of a particular name for a signatory of a document.\n\nAlso, as opposed to author attachments, signatory attachments are set one by\none and are explicitly named.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"name","in":"formData","type":"string","required":true,"description":"The name of the attachment.\n\nMust match an attachment name as requested by the document author.\n"},{"name":"attachment","in":"formData","type":"file","format":"application/pdf","required":false,"description":"Set / Unset a named signatory attachment for a signatory of a document.\n\nIf provided, this is the file to set as the attachment.\n\nIf not provided, this will remove the existing attachment.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"400":{"description":"The PDF provided is invalid."},"409":{"description":"TODO"}}}},"/documents/{document_id}/{signatory_id}/highlight":{"post":{"summary":"Add a highlight","tags":["Sign","Internal"],"description":"Add highlights to a page while a signatory is signing.\n","parameters":[{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},{"name":"page","in":"formData","type":"integer","required":true,"description":"The page affected (starts at `1`)."},{"name":"image","in":"formData","type":"string","format":"data:image/png;base64","required":false,"description":"If included, this sets the image provided as the highlight for that\npage, replacing any existing highlight image.\n\nIf omitted, clears this page of any highlights.\n"},{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"}],"responses":{"200":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}}}}},"/attachments/list":{"get":{"summary":"List","tags":["Attachment"],"description":"Fetch a list of attachments, with filtering and sorting options.\n","parameters":[{"name":"domain","in":"query","type":"string","format":"string","required":false,"description":"**Domain in which to search.**\n\nThe list always contains the attachments of the user. If `domain` is set\nto `All`, it will also return the attachments shared within the company.\n"},{"name":"filter","in":"query","type":"string","format":"application/json","required":false,"default":"[]","description":"**List of filtering options.**\n\nYou can supply a list of filtering options to apply.\nOnly attachments that match **all** filters will be returned.\nTherefore, it is easy to apply a set of filters that will return no\ndocuments.\n\nIf not supplied, the default is not to apply any filter, i.e. `[]`.\n\nMust be of type [Attachment List Filter](#attachment-list-filter), for\nexample:\n\n`[ { \"filter_by\":\"text\", \"text\":\"some keywords\"] } ]`\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Attachment List Filter","description":"Parameter used to filter attachments for the `list` API call.","type":"array","default":[],"example":[{"filter_by":"text","text":"keyword"}],"items":{"anyOf":[{"title":"Filter by text","type":"object","properties":{"filter_by":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}}},{"name":"sorting","in":"query","type":"string","format":"application/json","required":false,"default":"[ { \"sort_by\":\"time\", \"order\":\"descending\" } ]","description":"**List of sorting options.**\n\nYou can supply a list of sorting options, which will be applied to the\nlist of attachments in the order you provided.\n\nIf not supplied, the default is\n`[ { \"sort_by\":\"time\", \"order\":\"descending\" } ]`,\n*i.e.*, sort by modification time, newest first.\n\nMust be of type [List Sorting](#list-sorting).\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"List Sorting","description":"Parameter used to sort documents for the `list` API call.","type":"array","example":[{"sort_by":"author","order":"ascending"}],"items":{"type":"object","properties":{"order":{"default":"ascending","type":"string","enum":["ascending","descending"]},"sort_by":{"type":"string","enum":["title","status","mtime","author"]}},"required":["sort_by"]}}}],"responses":{"200":{"description":"A JSON object containing an array of attachments.\n","schema":{"type":"object","properties":{"attachments":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Attachment","type":"object","description":"A pre-uploaded attachment which can later be used when creating or signing\ndocuments.\n","properties":{"id":{"description":"**Unique identifier for an attachment.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the attachment.**\n\nThe title will be used when listing attachments.\n","readOnly":true},"file":{"type":"string","description":"**The attachment’s file ID.**\n","readOnly":true},"shared":{"type":"boolean","description":"**Sharing status.**\n\nWhether the attachment is shared with the other members of the company.\n"},"time":{"description":"Time at which the attachment was added.","type":"string","format":"date-time","readOnly":true}},"example":{"id":"2","title":"Terms and conditions","time":"2018-06-21T08:25:22.644059Z","shared":false,"file":"2"}}}}}}}}},"/attachments/{attachment_id}/download/{filename}":{"get":{"summary":"Download","tags":["Attachment"],"description":"**Get the attachment's PDF file.**\n\nThe optional `filename` parameter in the URL can be set to any valid file\nname. This allows you to download the file with user-specified file name in\nthe browser.\n","parameters":[{"name":"attachment_id","in":"path","type":"integer","format":"int64","required":true,"description":"Identifier for the attachment.\n"},{"name":"filename","in":"path","type":"string","required":false,"description":"Optional filename parameter.\n"}],"responses":{"200":{"description":"The attachment's PDF file.\n"}}}},"/attachments/new":{"post":{"summary":"Create","tags":["Attachment"],"description":"Create a new attachment.\n","parameters":[{"name":"title","in":"formData","type":"string","required":false,"description":"Title of the attachment. If not present, the title will be taken from\nthe file name.\n"},{"name":"file","in":"formData","type":"file","format":"application/pdf","required":true,"description":"The PDF to use for the attachment.\n"}],"responses":{"201":{"description":"The attachment has been added. The body is empty."}}}},"/attachments/delete":{"post":{"summary":"Delete","tags":["Attachment"],"description":"Delete the specified attachments.\n","parameters":[{"name":"attachment_ids","in":"formData","type":"string","format":"application/json","required":true,"description":"List of attachment IDs of attachments to delete.\n","schema":{"type":"array","default":[],"example":["3","4"],"items":{"type":"string"}}}],"responses":{"200":{"description":"The change has succeeded. The body is empty."}}}},"/attachments/setsharing":{"post":{"summary":"Share or unshare","tags":["Attachment"],"description":"Share or unshare the specified attachments with the company's other users.\n","parameters":[{"name":"attachment_ids","in":"formData","type":"string","format":"application/json","required":true,"description":"List of attachment IDs of attachments to share or unshare.\n","schema":{"type":"array","default":[],"example":["3","4"],"items":{"type":"string"}}},{"name":"shared","in":"formData","type":"string","format":"application/json","required":true,"description":"`true` to share, `false` to unshare.\n"}],"responses":{"202":{"description":"The change has succeeded. The body is empty."}}}},"/loginandgetsession":{"post":{"summary":"Login and get session","tags":["User"],"description":"Login as a user by using their OAuth tokens.\n\nThe tokens have to be acquired using `getpersonaltoken` endpoint, see\n[Personal Access Credentials](#personal-access-credentials).\n\nUsing this endpoint, you can create a link which redirects the user\ndirectly to any page on the Scrive eSign system without going through the\nlogin page.\n\nThis can be used to create a better user experience for your integration.\n\nThe call returns a _session id_, which can be used to create a link\nsuch as:\n`https://scrive.com/loginwithredirect?session_id=SESSION_ID&url=PATH_INSIDE_SCRIVE_COM`.\n\nThis link will redirect the user to `PATH_INSIDE_SCRIVE_COM`.\nRemember that all URL query parameters must be URL encoded!\n","parameters":[{"name":"personal_token","in":"formData","type":"string","format":"application/json","required":true,"description":"Must be of type [`OAuthAuthorization`](#oauthauthorization)\n","$schema":"http://json-schema.org/draft-04/schema#","title":"OAuthAuthorization","properties":{"apitoken":{"type":"string"},"apisecret":{"type":"string"},"accesstoken":{"type":"string"},"accesssecret":{"type":"string"}}}],"responses":{"200":{"description":"JSON response, for example:\n`{ \"session_id\" : \"12345-a2510867954321d0\" }`\n\nThe string format may change at any time, please treat it as an opaque\nstring.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SessionIDObject","type":"object","properties":{"session_id":{"type":"string"}}}}}}},"/gettokenforpersonalcredentials/{user_id}":{"post":{"summary":"Get temporary login_token for a user","tags":["User"],"description":"Generate a temporary `login_token` which can be used with `getpersonaltoken`\nto get valid OAuth credentials for that user. The endpoint also returns a\nbase64-encoded PNG image of a QR code. This QR code also contains the\n`login_token` embedded in a simple JSON structure. The only purpose of the\nJSON is to allow the potential for versioning in future.\n\nThis feature is generally for use with Scrive mobile applications and will\nbe supported in an upcoming relase.\n","parameters":[{"name":"minutes","in":"formData","type":"integer","required":false,"default":5,"maximum":30,"description":"How many minutes the `login_token` should be valid for (maximum of 30).\n"}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"LoginToken","type":"object","example":{"login_token":"a537e5e43d5b4095","qr_code":"iVBORw0KGgoAAAANSUhEUgAAAzQAAAM0AQMAAABXvPU0AAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlP//8i138cAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAL8SURBVHic7dpLbuswDAVQ70D736V34AJFLFKfpJ28B9A9HBiRLd6jIWHnuP5PHRwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcP6Cc8zV+oOWL9d15l3fy88BHA6Hw+Fw6jrp/ib9Tno5rQe3DwEcDofD4XDqO9G6ZyP4HkZ+F8DhcDgcDucxTl4ePfgc30608cLhcDgcDufZTsTt9x0bkcPhcDgczsOcXVx+J3F/wnjVmTN3ARwOh8PhcIo7Uw39v7qsARwOh8PhcEo7+4oRZK03mdutHA6Hw+FwKjpTVyzyHxsGNkaQacv6+YPD4XA4HE5JJ1pfdS5xkRnnyQdoPeXISw6Hw+FwOFWdiVjS7/5pyBjiesfxad7hcDgcDodTxckvIebXDD0uDhD7diMIh8PhcDicRzjRPyUty2MM3g4e04DC4XA4HA6npJNDhsxd625LHlWGo3A4HA6Hw6nqTA15GV1TyJl/LQe9OBwOh8PhFHc+zCFn77qD81HOvCWecjgcDofDqe9Mo8UxVo6LA1wLlscSDofD4XA41Z0sRkjL95bpIyqIYTOHw+FwOJz6zkKcY8M9gkzjxpCZH3A4HA6HwyntBJHfSdwhMYJMw0iePoZf7+YQDofD4XA4xZwl6crEMocMbfH0WorD4XA4HE5dZ3kxcTvLr3tzXN62cTgcDofDqevc40bUFJIfDaPKm3QOh8PhcDiPcV7p072rO63HfTrAz3MIh8PhcDicEs6Uvtjn5hSrM+VxOBwOh8Op6uxq15XtH8/I4XA4HA6ntHPMFUPGd8P0ReO+92HzxeFwOBwOp7zThid9mfuvhQh7OW3K43A4HA6HU9eJHctyqpYPMD27luJwOBwOh/Mgp/Xnw7gxvaLIbzGOcR+Hw+FwOJzHOcf49WIIycSVD/Vq43A4HA6H8whnx+6SdnPI7igcDofD4XCKO1Otc0hO31XrR7lPxuFwOBwOp7TzT4vD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HM5znS/lqLjLlQGH4gAAAABJRU5ErkJggg==","expiration_time":"2019-02-25 10:50:00.507433116 UTC"},"description":"Returns a JSON containing `login_token`, `qr_code` and `expiration_time`.\n","properties":{"login_token":{"type":"string"},"qr_code":{"type":"string"},"expiration_time":{"type":"string"}}}}}},"/2fa/setup":{"post":{"summary":"Setup 2FA","tags":["User"],"description":"If already activated, returns true,\nelse triggers QR code generation\n","responses":{"200":{"description":"A JSON with the `twofactor_active` flag and (if not activated yet) a `qr_code`. If present, the field `qr_code` contains a base64-encoded image of the QR code.\n"}}}},"/2fa/confirm":{"post":{"summary":"Confirm 2FA","tags":["User"],"description":"Activates 2-factor-authentication if 2-factor code from QR code is valid\n","parameters":[{"name":"totp","in":"formData","type":"string","required":true,"description":"2-factor code\n"}],"responses":{"200":{"description":"A JSON with the `twofactor_active` flag and `totp_valid` flag\n"},"400":{"description":"2-factor code from QR code is invalid\n"}}}},"/2fa/disable":{"post":{"summary":"Disable 2FA","tags":["User"],"description":"Disables 2-factor-authentication\n","responses":{"200":{"description":"A JSON with the `twofactor_active` flag\n"}}}},"/isuserdeletable":{"post":{"summary":"Is user deletable?","tags":["User"],"description":"Returns an object with boolean flag\n","responses":{"200":{"description":"A JSON with the `deletable` flag and (if not deletable) a `reason`\n","schema":{"type":"object","properties":{"deletable":{"type":"boolean"},"reason":{"type":"string"}}}}}}},"/deleteuser":{"post":{"summary":"Delete user","tags":["User"],"parameters":[{"name":"email","in":"formData","type":"string","required":true,"description":"User's email\n"}],"responses":{"200":{"description":"The user was deleted succesfully. The body is empty\n"},"400":{"description":"Email parameter isn't provided or doesn't match the user's email\n"}}}},"/dataretentionpolicy":{"get":{"summary":"Get data retention policies","tags":["User"],"description":"Returns an object with user and company data detention policies\n","responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicies","type":"object","description":"An object with data retention policies properties.\n","example":{"company_data_retention_policy":{"immediate_trash":false},"data_retention_policy":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32}},"properties":{"company_data_retention_policy":{"type":"object","$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","description":"An object with data retention policy properties.\n","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}},"data_retention_policy":{"type":"object","$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","description":"An object with data retention policy properties.\n","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}}}}}}},"/dataretentionpolicy/set":{"post":{"summary":"Set data retention policies","tags":["User"],"description":"Returns an object with user and company data detention policies\n","parameters":[{"name":"data_retention_policy","in":"formData","format":"application/json","required":true,"description":"Must be of type [`DataRetentionPolicy`](#dataretentionpolicy)\n","$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","type":"object","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}}],"responses":{"200":{"description":"The data retention policy has been updated. The body is empty.\n"}}}},"/usertags":{"get":{"summary":"Get tags","tags":["User"],"description":"Returns tags attached to the user\n","responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}}},"/usertags/update":{"post":{"summary":"Update tags","tags":["User"],"description":"Updates tags attached to the user.\n","parameters":[{"name":"tags","in":"formData","format":"application/json","required":true,"description":"Must be of type [`Tags`](#tags)\n","$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}],"responses":{"200":{"description":"The tags have been updated. The body is empty.\n"}}}},"/usagestats/days":{"get":{"summary":"Get usage stats for days","tags":["User"],"description":"Retrieve usage statistics for the last 30 days\n","parameters":[{"name":"withCompany","in":"query","type":"string","required":false,"description":"Boolean flag for showing company information in the response.\n"}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserStats","type":"object","example":{"stats":[{"date":"2019-01-03","name":"Organisation total","sent":1,"closed":1,"signatures":1,"user_stats":[{"date":"2019-01-03","email":"demo@scrive.com","name":" ","sent":1,"closed":1,"signatures":1}]}]},"description":"A JSON object with the statistics on usage:\n count of documents on different stages of the process\n","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"},"user_stats":{"type":"array","required":false,"description":"Only present when the `withCompany` flag is set\n","items":{"type":"object","properties":{"date":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"}}}}}}}}}}}},"/usagestats/months":{"get":{"summary":"Get usage stats for months","tags":["User"],"description":"Retrieve usage statistics for the last 6 months\n","parameters":[{"name":"withCompany","in":"query","type":"string","required":false,"description":"Boolean flag for showing company information in the response.\n"}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserStats","type":"object","example":{"stats":[{"date":"2019-01-03","name":"Organisation total","sent":1,"closed":1,"signatures":1,"user_stats":[{"date":"2019-01-03","email":"demo@scrive.com","name":" ","sent":1,"closed":1,"signatures":1}]}]},"description":"A JSON object with the statistics on usage:\n count of documents on different stages of the process\n","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"},"user_stats":{"type":"array","required":false,"description":"Only present when the `withCompany` flag is set\n","items":{"type":"object","properties":{"date":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"}}}}}}}}}}}},"/signup":{"post":{"summary":"Signup Request","tags":["User"],"description":"Create a new user signup request.\nUsed to handle submission of the signup form.\n\nIf there is no user associated with the given email address, then a new\naccount will be created, and an activation email will be sent to them.\n\nIf there already is an account, but the user has not yet accepted the\nScrive eSign _Terms of Service_, then a new activation email will be sent\nto them.\n\nIf a user account that has accepted the _Terms of Service_ already exists,\nno signup request will be created.\n","parameters":[{"name":"email","in":"formData","type":"email","required":true,"description":"Has to be a valid email address format."},{"name":"firstName","in":"formData","type":"string","required":false,"description":"Has to be a valid name string."},{"name":"lastName","in":"formData","type":"string","required":false,"description":"Has to be a valid name string."},{"name":"phone","in":"formData","type":"string","required":false,"description":"Has to be a valid phone"},{"name":"companyName","in":"formData","type":"string","required":false,"description":"Has to be a valid company name"},{"name":"companyPosition","in":"formData","type":"string","required":false,"description":"Has to be a valid position"},{"name":"lang","in":"formData","type":"string","required":false,"description":"Has to be a valid lang code [`LanguageCode`](#language-code)\n","$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]}],"responses":{"200":{"description":"JSON response, will be one of:\n * `{ \"sent\": true }`\n * `{ \"sent\": false }`\n"}}}},"/usergroups/create":{"post":{"summary":"Create User Group","tags":["User Group"],"description":"> Example of JSON that could be passed in to create a User Group:\n\n> The JSON is URL-encoded and passed in via the `usergroup` form data field.\n> It is not necessary to minify the JSON, but also not prohibited.\n\n```json\n{\n \"parent_id\": \"1\",\n \"name\": \"New UG that's the child of user group 1\"\n \"tags\": [\n {\n \"name\": \"side\",\n \"value\": \"dark\"\n }\n ]\n}\n```\n\n> For examples of the JSON output, see details of \"View User Group\".\n\nThis endpoint allows you to create a new User Group. When creating it, you\nhave the option to set the User Group's name and to specify which other User\nGroup it will be a child of.\n\nThe JSON input must be passed, URL-encoded, via the `usergroup` form data\nfield.\n\nYou must set a `parent_id` since only internal Scrive admins are permitted\nto create root User Groups. In order to create a new child, you must have\nthe requisite permissions upon the parent.\n\nYou can also set `tags`, which are arbitrary name/value pairs.\n\nA full User Group JSON response is returned which displays the state _after_\nthe create operation has been performed. Performing `/update` and then\nusing the `GET` endpoint should produce the same output both times.\n","parameters":[{"name":"usergroup","in":"formData","type":"string","format":"application/json","description":"JSON object containing the `name`, `parent_id`, and `tags` of the User\nGroup to be created.\n","example":{"name":"new user group","parent_id":1,"tags":[]},"required":true},{"name":"include-inheritable","in":"query","type":"boolean","description":"Append `?include-inheritable` to the URL to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroup","type":"object","example":{"id":"1","parent_id":null,"name":"A Root Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"contact_details":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"tags":[{"name":"alignment","value":"chaotic good"}]},"description":"JSON representation of a User Group.\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to update it)\n"}}}},"/usergroups/{user_group_id}":{"get":{"summary":"View User Group","tags":["User Group"],"description":"> Example of a User Group without inheritable previews:\n\n```json\n{\n \"id\": \"5\",\n \"parent_id\": \"1\",\n \"name\": \"A Child Usergroup\",\n \"children\": [\n {\n \"id\": \"2\",\n \"name\": \"Some child user group\"\n },\n {\n \"id\": \"3\",\n \"name\": \"Yet another child user group\"\n }\n ],\n \"settings\": {\n \"inherited_from\": null,\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": 42,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n }\n },\n \"contact_details\": {\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n }\n },\n \"tags\": [\n {\n \"name\": \"founded\",\n \"value\": \"1846\"\n },\n {\n \"name\": \"status\",\n \"value\": \"busy\"\n }\n ]\n}\n```\n\n> Example of a User Group with inheritable previews:\n\n```json\n{\n \"id\": \"5\",\n \"parent_id\": \"1\",\n \"name\": \"A Child Usergroup\",\n \"children\": [\n {\n \"id\": \"2\",\n \"name\": \"Some child user group\"\n },\n {\n \"id\": \"3\",\n \"name\": \"Yet another child user group\"\n }\n ],\n \"settings\": {\n \"inherited_from\": null,\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": 42,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": 23,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": true\n }\n }\n },\n \"contact_details\": {\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n }\n }\n },\n \"tags\": [\n {\n \"name\": \"founded\",\n \"value\": \"1846\"\n },\n {\n \"name\": \"status\",\n \"value\": \"busy\"\n }\n ]\n}\n```\n\nThis endpoint is used to get an overview of a given User Group, including\nother, related and dependent, objects. At time of writing, those extra\nobjects are `contact_details` and `settings`.\n\nThese dependent objects can be inherited. In this case, their\n`inherited_from` field will be non-null. The value in this field is the\nID of the User Group which the value is inherited from.\n\nInheritance works as follows:\n\nRoot User Groups (i.e. those who are not children of other User Groups) may\nnot inherit since there are no ancestors to inherit from.\n\nA child User Group may inherit or have its own dedicated object. In the case\nthat a User Group chooses to inherit, for example, the `contact_details`\nobject, then that User Group will inherit from the closest direct ancestor\nwith its own `contact_details` object. Since root User Groups cannot\ninherit, there will always be an ancestor from which a child can inherit.\n\nIf you would like to see what a User Group _would_ inherit then you can\nappend `?include-inheritable` to the URL when making the call. This will add\nextra `inheritable_preview` subtrees to the objects which perform the\ninheritance calculation, ignoring whether or not the User Group already\ninherits.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group you wish to view","required":true},{"name":"include-inheritable","in":"query","type":"boolean","description":"Append `?include-inheritable` to the URL to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroup","type":"object","example":{"id":"1","parent_id":null,"name":"A Root Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"contact_details":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"tags":[{"name":"alignment","value":"chaotic good"}]},"description":"JSON representation of a User Group.\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/usergroups/{user_group_id}/update":{"post":{"summary":"Update User Group","tags":["User Group"],"description":"> Example of JSON that could be passed in to update a User Group:\n\n> The JSON is URL-encoded and passed in via the `usergroup` form data field.\n> It is not necessary to minify the JSON, but also not prohibited.\n\n```json\n{\n \"parent_id\": \"1\",\n \"name\": \"UG that's now the child of user group 1\"\n \"tags\": [\n {\n \"name\": \"station\",\n \"value\": \"ISS\"\n },\n {\n \"name\": \"lifeform\",\n \"value\": null\n }\n ]\n}\n```\n\n> For examples of the JSON output, see details of \"View User Group\".\n\nThis endpoint allows you to update the User Group's meta data, or to change\nits parent ID (i.e. to move this User Group so that it is the child of a\ndiffernt User Group).\n\nThe JSON input must be passed, URL-encoded, via the `usergroup` form data\nfield.\n\nWhen updating the `parent_id`, the following rules are in force:\n\n+ Only internal Scrive admins can promote a child User Group to a root.\n+ A root UserGroup may by subordinated to (i.e. made a child of) another User\nGroup if you have permissions to modify the new parent and User Group\nbeing moved.\n+ A child User Group may be moved to be a child of another User Group as long\nas you have permissions to update the group being moved, the new parent and\nthe old parent.\n\nTags are updated as follows:\n\n+ Only the provided tags are affected on the server.\n+ If the value of a tag is a string, the name/value pair is stored,\n overwriting the previous value associated with that name.\n+ If the value of a tag is `null`, the name/value pair is removed.\n+ Other value types lead to 400 Bad Request response.\n\nThe endpoint supports partial updates. This means that only the fields you\nsupply in your requests will have their values altered.\n\nA full User Group JSON response is returned which displays the state _after_\nthe update operation has been performed. Performing `/update` and then\nusing the `GET` endpoint should produce the same output both times.\n\n**Important Note**: *You cannot move usergroups by updating the `children`\nfield, it must be done via `parent_id`*.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group you wish to update","required":true},{"name":"usergroup","in":"formData","type":"string","format":"application/json","description":"JSON object containing the new `name`, `parent_id` or `tags` for the User\nGroup.\n","example":{"name":"new user group","parent_id":1,"tags":[{"name":"foo","value":"bar"}]},"required":true},{"name":"include-inheritable","in":"formData","type":"boolean","description":"Set to `true` to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroup","type":"object","example":{"id":"1","parent_id":null,"name":"A Root Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"contact_details":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"tags":[{"name":"alignment","value":"chaotic good"}]},"description":"JSON representation of a User Group.\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to update it)\n"}}}},"/usergroups/{user_group_id}/delete":{"post":{"summary":"Delete User Group","tags":["User Group"],"description":"> Example of JSON returned:\n\n```json\n{\n \"id\": \"1\",\n \"resource\": \"usergroup\",\n \"action\": \"deleted\"\n}\n```\n\nThis endpoint allows you to delete a User Group.\n\nIt's worth noting that you may only delete child User Groups. Root User\nGroups can only deleted by internal Scrive admins. We also do not support\nrecursive deletion. If this is required, it can be implemented client-side\nby simply working up the tree, deleting the leaves.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group you wish to update","required":true}],"responses":{"200":{"type":"object","description":"Simple JSON showing that a User Group with a given ID has been deleted.\n","properties":{"id":{"type":"integer"},"resource":{"type":"string"},"action":{"type":"string"}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to update it)\n"}}}},"/usergroups/{user_group_id}/contact_details":{"get":{"summary":"View User Group Contact Details","tags":["User Group"],"description":"> Example of a User Group Contact Details without inheritable previews:\n\n```json\n{\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n }\n}\n```\n\n> Example of a User Group Contact Details with inheritable previews\n> (where the User Group is root and therefore must have its own Contact\n> Details object):\n\n```json\n{\n \"inherited_from\": null,\n \"address\": {\n \"company_number\": \"0987654321\",\n \"company_name\": \"Scrive\",\n \"address\": \"Other Street\",\n \"zip\": \"00-321\",\n \"city\": \"Warsaw\",\n \"country\": \"PL\"\n },\n \"inheritable_preview\": null\n}\n```\n\n> Example of a User Group Contact Details with inheritable previews\n> (where the User Group is a child with its own Contact Details object):\n\n```json\n{\n \"inherited_from\": null,\n \"address\": {\n \"company_number\": \"0987654321\",\n \"company_name\": \"Scrive\",\n \"address\": \"123 Other Street\",\n \"zip\": \"00-321\",\n \"city\": \"Warsaw\",\n \"country\": \"Poland\"\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n }\n }\n}\n```\n\n> Example of a User Group Contact Details with inheritable previews\n> (where the User Group is a child which inherits, meaning that the\n> `inheritable_preview` field is a duplicate):\n\n```json\n{\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"address\": {\n \"company_number\": \"5568166804\",\n \"company_name\": \"Scrive\",\n \"address\": \"Grev Turegatan 11A\",\n \"zip\": \"114 46\",\n \"city\": \"Stockholm\",\n \"country\": \"Sweden\"\n }\n }\n}\n```\n\nThis endpoint is used to get an overview of a given User Group's\n`contact_details` object.\n\nThe `contact_details` object can be inherited. In this case, the\n`inherited_from` field will be non-null. The value in this field is the ID\nof the User Group which the value is inherited from.\n\nInheritance works as follows:\n\nRoot User Groups (i.e. those who are not children of other User Groups) may\nnot inherit since there are no ancestors to inherit from.\n\nA child User Group may inherit or have its own dedicated object. In the case\nthat a User Group chooses to inherit the `contact_details` object, then that\nUser Group will inherit from the closest direct ancestor with its own\n`contact_details` object. Since root User Groups cannot inherit, there will\nalways be an ancestor from which a child can inherit.\n\nIf you would like to see what a User Group _would_ inherit then you can\nappend `?include-inheritable` to the URL when making the call. This will add\nextra `inheritable_preview` subtrees to the objects which perform the\ninheritance calculation, ignoring whether or not the User Group already\ninherits.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `contact_details` object you wish to view\n","required":true},{"name":"include-inheritable","in":"query","type":"boolean","description":"Append `?include-inheritable` to the URL to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/usergroups/{user_group_id}/contact_details/update":{"post":{"summary":"Update User Group Contact Details","tags":["User Group"],"description":"\n> Example of JSON that could be passed in to update a User Group's Contact\n> Details:\n\n> The JSON is URL-encoded and passed in via the `contact_details` form data\n> field. It is not necessary to minify the JSON, but also not prohibited.\n\n```json\n{\n \"address\": {\n \"company_number\": \"0987654321\",\n \"company_name\": \"Scrive\",\n \"address\": \"123 Other Street\",\n \"zip\": \"00-321\",\n \"city\": \"Warsaw\",\n \"country\": \"Poland\"\n }\n}\n```\n\n> For examples of the JSON output, see\n> [View User Group Contact Details](#view-user-group-contact-details).\n\nThis endpoint allows you to update the User Group's `contact_details` object.\n\nWhen updating the `contact_details` object, the following rules are in\nforce:\n\nPartial updates are permissible (and encouraged). You may only supply the\nJSON fields that you wish to actually update.\n\nIf you update the contact_details of a User Group which currently inherits,\na new, blank `contact_details` object will be created and your (partial or\nfull) update applied to it.\n\nThe User Group from which the contact_details were previously inherited will\nbe unaffected by the operation.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `contact_details` object you wish to update\n","required":true},{"name":"contact_details","in":"formData","type":"string","format":"application/json","description":"JSON object containing (partial or full) updates to the contact_details\nsubtrees (currently only `data_retention_policy` is exposed by the API).\n","example":{"data_retention_policy":{"immediate_trash":false}},"required":true},{"name":"include-inheritable","in":"formData","type":"boolean","description":"Set to `true` to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to update it)\n"}}}},"/usergroups/{user_group_id}/contact_details/delete":{"post":{"summary":"Delete User Group Contact Details","tags":["User Group"],"description":"> For examples of the JSON output, see\n> [View User Group Contact Details](#view-user-group-contact-details).\n\nThis endpoint is used to delete a given User Group's `contact_details`\nobject. This will cause the contact_details to be inherited rather than the\nUser Group having its own dedicated contact_details object.\n\nAs such, calling delete on a User Group that already inherits will result\nin no operation being performed. Also, attempting to delete the\ncontact_details object of a root User Group will result in an error.\n\nFor more details on inheritance, see [View User Group Contact Details](#view-user-group-contact-details).\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `contact_details` object you wish to\ndelete\n","required":true},{"name":"include-inheritable","in":"formData","type":"boolean","description":"Set to `true` to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/usergroups/{user_group_id}/settings":{"get":{"summary":"View User Group Settings","tags":["User Group"],"description":"\n> Example of a User Group Settings without inheritable previews:\n\n```json\n{\n \"inherited_from\": \"1\",\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n }\n}\n```\n\n> Example of a User Group Settings with inheritable previews (where the User\n> Group is root and therefore must have its own Settings object):\n\n```json\n{\n \"inherited_from\": null,\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n },\n \"inheritable_preview\": null\n}\n```\n\n> Example of a User Group Settings with inheritable previews (where the User\n> Group is a child with its own Settings object):\n\n```json\n{\n \"inherited_from\": null,\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n }\n }\n}\n```\n\n> Example of a User Group Settings with inheritable previews (where the User\n> Group is a child which inherits, meaning that the `inheritable_preview`\n> field is a duplicate):\n\n```json\n{\n \"inherited_from\": \"1\",\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n },\n \"inheritable_preview\": {\n \"inherited_from\": \"1\",\n \"data_retention_policy\": {\n \"idle_doc_timeout_preparation\": null,\n \"idle_doc_timeout_closed\": null,\n \"idle_doc_timeout_canceled\": null,\n \"idle_doc_timeout_timedout\": null,\n \"idle_doc_timeout_rejected\": null,\n \"idle_doc_timeout_error\": null,\n \"immediate_trash\": false\n }\n }\n}\n```\n\nThis endpoint is used to get an overview of a given User Group's `settings`\nobject.\n\nThe `settings` object can be inherited. In this case, the `inherited_from`\nfield will be non-null. The value in this field is the ID of the User Group\nwhich the value is inherited from.\n\nInheritance works as follows:\n\nRoot User Groups (i.e. those who are not children of other User Groups) may\nnot inherit since there are no ancestors to inherit from.\n\nA child User Group may inherit or have its own dedicated object. In the case\nthat a User Group chooses to inherit the `settings` object, then that User\nGroup will inherit from the closest direct ancestor with its own\n`settings` object. Since root User Groups cannot inherit, there will\nalways be an ancestor from which a child can inherit.\n\nIf you would like to see what a User Group _would_ inherit then you can\nappend `?include-inheritable` to the URL when making the call. This will add\nextra `inheritable_preview` subtrees to the objects which perform the\ninheritance calculation, ignoring whether or not the User Group already\ninherits.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `settings` object you wish to view\n","required":true},{"name":"include-inheritable","in":"query","type":"boolean","description":"Append `?include-inheritable` to the URL to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/usergroups/{user_group_id}/settings/update":{"post":{"summary":"Update User Group Settings","tags":["User Group"],"description":"\n> Example of JSON that could be passed in to update a User Group's Settings:\n\n> The JSON is URL-encoded and passed in via the `settings` form data field.\n> It is not necessary to minify the JSON, but also not prohibited.\n\n> The example below is an example of a partial update.\n\n```json\n{\n \"data_retention_policy\": {\n \"idle_doc_timeout_closed\": 123\n }\n}\n```\n\n> For examples of the JSON output, see \n> [View User Group Settings](#view-user-group-settings).\n\nThis endpoint allows you to update the User Group's `settings` object.\n\nWhen updating the `settings` object, the following rules are in force:\n\nPartial updates are permissible (and encouraged). You may only supply the\nJSON fields that you wish to actually update.\n\nIf you update the settings of a User Group which currently inherits, the\ninherited settings will be cloned, your update applied, and this will then\nbecome the new non-inherited settings object for this User Group.\n\nThe User Group from which the contact_details were previously inherited will\nbe unaffected by the operation.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `settings` object you wish to update\n","required":true},{"name":"settings","in":"formData","type":"string","format":"application/json","description":"JSON object containing (partial or full) updates to the settings\nsubtrees (currently only `data_retention_policy` is exposed by the API).\n","example":{"data_retention_policy":{"immediate_trash":false}},"required":true},{"name":"include-inheritable","in":"formData","type":"boolean","description":"Set to `true` to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to update it)\n"}}}},"/usergroups/{user_group_id}/settings/delete":{"post":{"summary":"Delete User Group Settings","tags":["User Group"],"description":"> For examples of the JSON output, see\n> [View User Group Settings](#view-user-group-settings).\n\nThis endpoint is used to delete a given User Group's `settings` object. This\nwill cause the settings to be inherited rather than the User Group having\nits own dedicated settings object.\n\nAs such, calling delete on a User Group that already inherits will result\nin no operation being performed. Also, attempting to delete the settings\nobject of a root User Group will result in an error.\n\nFor more details on inheritance, see [View User Group Settings](#view-user-group-settings).\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose `settings` object you wish to delete\n","required":true},{"name":"include-inheritable","in":"formData","type":"boolean","description":"Set to `true` to see a preview of which\nvalues can be inherited from an ancestor User Group.\n","required":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/usergroups/{user_group_id}/users":{"get":{"summary":"List Users in User Group","tags":["User Group"],"description":"> Example of a list of the users in a User Group:\n\n```json\n[\n {\n \"id\": \"1\",\n \"fstname\": \"Arthur\",\n \"sndname\": \"Dent\",\n \"email\": \"arthur.dent@scrive.com\",\n \"twofactor_active\": false,\n \"twofactor_is_mandatory\": false,\n \"personalnumber\": \"197910124242\",\n \"phone\": \"+444242424242\",\n \"companyadmin\": true,\n \"companyposition\": \"Hitchhiker\",\n \"lang\": \"en\"\n }\n]\n```\n\nThis endpoint is used to list Users who are members of that User Group.\n\nNote that this will only display Users that are in that User Group and will\nnot show the Users who are members of any descendent User Groups.\n","parameters":[{"name":"user_group_id","in":"path","type":"integer","description":"The ID of the User Group whose users you wish to view","required":true}],"responses":{"200":{"description":"List of Users in the User Group","type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"User","type":"object","example":{"id":"1","fstname":"Arthur","sndname":"Dent","email":"arthur.dent@scrive.com","twofactor_active":false,"twofactor_is_mandatory":false,"personalnumber":"197910124242","phone":"+444242424242","companyadmin":true,"companyposition":"Hitchhiker","lang":"en"},"description":"JSON representation of a User.\n","properties":{"id":{"type":"string"},"fstname":{"type":"string"},"sndname":{"type":"string"},"email":{"type":"string"},"sysauth":{"type":"string"},"home_folder_id":{"type":"string"},"twofactor_active":{"type":"boolean"},"twofactor_is_mandatory":{"type":"boolean"},"personalnumber":{"type":"string"},"phone":{"type":"string"},"companyadmin":{"type":"boolean"},"companyposition":{"type":"string"},"lang":{"type":"string"}}}},"403":{"description":"Insufficient Permissions error (this means that either no User Group\nexists with this ID or that you do not have permission to view it)\n"}}}},"/getuserroles/{user_id}":{"get":{"summary":"View Access Roles for User","tags":["Access Control"],"description":"> Example of a User's Access Roles\n\n```json\n[\n {\n \"id\": \"8\",\n \"is_generated\": false,\n \"role_type\": \"user_group_admin\",\n \"source\": {\n \"type\": \"user\",\n \"id\": \"2\"\n },\n \"target\": {\n \"type\": \"user_group\",\n \"id\": \"11\"\n },\n \"allowed_actions\": {\n \"document\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"folder_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_group\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_group_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_personal_token\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ]\n }\n },\n {\n \"id\": null,\n \"is_generated\": true,\n \"role_type\": \"user_admin\",\n \"source\": {\n \"type\": \"user\",\n \"id\": \"2\"\n },\n \"target\": {\n \"type\": \"user_group\",\n \"id\": \"8\"\n },\n \"allowed_actions\": {\n \"user\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_group\": [\n \"read\"\n ],\n \"user_group_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_personal_token\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ]\n }\n }\n]\n```\n\nThis endpoint is used to view the roles which have been granted to a given\nuser.\n","parameters":[{"name":"user_id","in":"url","type":"integer","description":"The ID of the User whose roles you wish to view","required":true}],"responses":{"200":{"description":"A JSON array of Access Role objects.\n","schema":{"type":"array","default":[],"items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccessRole","type":"object","example":{"id":"8","is_generated":false,"role_type":"user_group_admin","source":{"type":"user","id":"2"},"target":{"type":"user_group","id":"11"}},"description":"JSON representation of an Access Role.\n","properties":{"id":{"type":"string"},"is_generated":{"type":"boolean"},"role_type":{"type":"string","enum":["user","user_group_member","user_admin","user_group_admin","document_admin"]},"source":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group"]},"id":{"type":"string"}}},"target":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group","folder"]},"id":{"type":"string"}}},"allowed_actions":{"type":"object","properties":{"document":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"folder_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_personal_token":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}}}}}}}},"403":{"description":"Insufficient Permissions error (this means that you don't have Read\npermissions upon the User or the User does not exist).\n"}}}},"/accesscontrol/roles/{role_id}":{"get":{"summary":"View Access Role","tags":["Access Control"],"description":"> Example of an Access Role\n\n```json\n{\n \"id\": \"8\",\n \"is_generated\": false,\n \"role_type\": \"user_group_admin\",\n \"source\": {\n \"type\": \"user\",\n \"id\": \"2\"\n },\n \"target\": {\n \"type\": \"user_group\",\n \"id\": \"11\"\n },\n \"allowed_actions\": {\n \"document\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"folder_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_group\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_group_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_personal_token\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ],\n \"user_policy\": [\n \"create\",\n \"delete\",\n \"read\",\n \"update\"\n ]\n }\n}\n```\n\nThis endpoint is used to get the details of a given access role. Only\nexplicitly granted roles can be viewed via this endpoint, since implicit\nroles do not have an ID of their own to reference them by.\n\nImplicit roles are those roles which are granted automatically as a result\nof, for example, User Group membership. Implicit roles have `is_generated`\nset to `true` and `id` set to `null`.\n\nExplicit roles are those which have been, as the name suggests, explicitly\ngranted. This was also almost done certainly via this API. Explicit roles\nhave `is_generated` set to `false` and a non-`null` `id`.\n","parameters":[{"name":"role_id","in":"url","type":"integer","description":"The ID of the Access Role you wish to view","required":true}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccessRole","type":"object","example":{"id":"8","is_generated":false,"role_type":"user_group_admin","source":{"type":"user","id":"2"},"target":{"type":"user_group","id":"11"}},"description":"JSON representation of an Access Role.\n","properties":{"id":{"type":"string"},"is_generated":{"type":"boolean"},"role_type":{"type":"string","enum":["user","user_group_member","user_admin","user_group_admin","document_admin"]},"source":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group"]},"id":{"type":"string"}}},"target":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group","folder"]},"id":{"type":"string"}}},"allowed_actions":{"type":"object","properties":{"document":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"folder_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_personal_token":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}}}}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to view details of the role. In practice this means that\nyou lack Read permissions on either the source or the target that the\nrole refers to.\n"}}}},"/accesscontrol/roles/{role_id}/add":{"post":{"summary":"Grant Access Role","tags":["Access Control"],"description":"> Example of JSON that could be used to grant a new role:\n\n```json\n{\n \"role_type\": \"user\",\n \"source\": {\n \"type\": \"user\",\n \"id\": \"2\"\n },\n \"target\": {\n \"type\": \"user\",\n \"id\": \"4\"\n }\n}\n```\n\nThis endpoint allows you to grant a new Access Role.\n","parameters":[{"name":"role","in":"formData","type":"string","format":"application/json","description":"JSON object containing details of the role to be granted.\n","example":{"role_type":"user","source":{"type":"user","id":"2"},"target":{"type":"user","id":"4"}},"required":true}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccessRole","type":"object","example":{"id":"8","is_generated":false,"role_type":"user_group_admin","source":{"type":"user","id":"2"},"target":{"type":"user_group","id":"11"}},"description":"JSON representation of an Access Role.\n","properties":{"id":{"type":"string"},"is_generated":{"type":"boolean"},"role_type":{"type":"string","enum":["user","user_group_member","user_admin","user_group_admin","document_admin"]},"source":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group"]},"id":{"type":"string"}}},"target":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group","folder"]},"id":{"type":"string"}}},"allowed_actions":{"type":"object","properties":{"document":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"folder_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_personal_token":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}}}}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to grant this role. In practice this means that you lack\nCreate permissions on the Policy relation for either the source or the\ntarget that the proposed role refers to.\n"}}}},"/accesscontrol/roles/{role_id}/delete":{"post":{"summary":"Delete Access Role","tags":["Access Control"],"description":"The endpoint allows you to delete an explicitly granted access role.\n\n_Explicitly granted_ in this case generally means \"role which was created\nvia the Access Control API\" as opposed to an implicit role acquired via, for\nexample, User Group membership. If it has a non-`null` `id` field then it is\nan explicit role and can be deleted.\n","parameters":[{"name":"role_id","in":"url","type":"integer","description":"The ID of the Access Role you wish to view","required":true}],"responses":{"200":{"description":"JSON object showing that an Access Role with the given ID has been\nsuccessfully deleted.\n"},"403":{"description":"Insufficient Permissions error (this means that you don't have Delete\npermissions upon the Policy relation of either the source or target of\nthe role). Either that, or no Access Role exists with this `id`.\n"}}}},"/folders/{folder_id}":{"get":{"summary":"View Folder","tags":["Folders"],"description":"> Example of a Folder\n\n```json\n{\n \"id\": \"1\",\n \"name\": \"Root folder\",\n \"home_for_user\": null,\n \"home_for_user_group\": \"10\",\n \"parent_id\": null,\n \"children\": [\n {\n \"id\": \"2\",\n \"name\": \"Subfolder of 1\",\n \"home_for_user\": \"33\",\n \"home_for_user_group\": null\n }\n ]\n}\n```\n\nThis endpoint is used to get the details of a given folder. Note that the\ncontents of the folder are not displayed, just the metadata about the\nfolder.\n\nThis metadata currently consists of the folder's ID, name, its parent ID (if any),\nIDs of the user and the user group for whom the folder is a home folder\nand information about its children. Only the immediate children are\nincluded by default (see the `recursive` parameter).\n","parameters":[{"name":"folder_id","in":"url","type":"string","description":"The ID of the Folder you wish to view","required":true},{"name":"recursive","in":"query","type":"boolean","description":"Set ?recursive=true to include all descendant folders in the metadata\ninstead of just the immediate children.\n","required":false,"default":false}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","type":"object","example":{"id":"1","name":"Root folder","home_for_user":null,"home_for_user_group":"10","parent_id":null,"children":[{"id":"2","name":"Subfolder of 1","home_for_user":"33","home_for_user_group":null,"children":[{"id":"3","name":"Subfolder of 2","home_for_user":"44","home_for_user_group":null}]}]},"description":"JSON representation of a Folder.\n","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"home_for_user":{"type":"string","description":"If the folder is a home folder for a user this field contains the ID of that user. Otherwise it's null.\n"},"home_for_user_group":{"type":"string","description":"If the folder is a home folder for a user group this field contains the ID of that group. Otherwise it's null.\n"},"parent_id":{"type":"string","description":"Optional property. If present contains either the ID of the parent folder\nor null if the requested folder is root.\n"},"children":{"type":"array","items":{"type":"Folder"},"description":"Optional property. If present contains either the immediate children or all descendant folders.\n"}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to view this Folder). In practice this means that you lack\nRead permissions on the Folder. Uniquely, for this endpoint, it is also\npossible to acquire Read permissions by being a signatory or approver\nof a document in that folder.\n"}}}},"/folders/create":{"post":{"summary":"Create Folder","tags":["Folders"],"description":"> Example of JSON that could be used create a new Folder:\n\n```json\n{\n \"name\": \"new child folder of 1\",\n \"parent_id\": \"1\"\n}\n```\n\nThis endpoint allows you to create a new Folder. When creating it, you have\nthe option to set the Folder's name and to specify which other Folder it\nwill be a child of.\n\nThe JSON input must be passed, URL-encoded, via the `folder` form data\nfield.\n\nYou must set a `parent_id` since only internal Scrive admins are permitted\nto create root Folders. In order to create a new child, you must have the\nrequisite permissions upon the parent. `name` will be an empty string if\nyou do not include it.\n\nA full Folder JSON response is returned which displays the state after the\ncreate operation has been performed. Performing `/update` and then using the\nGET endpoint should produce the same output both times.\n","parameters":[{"name":"folder","in":"formData","type":"string","format":"application/json","description":"JSON object containing details of the folder to be created.\n","example":{"name":"new child folder of 1","parent_id":"1"}}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","type":"object","example":{"id":"1","name":"Root folder","home_for_user":null,"home_for_user_group":"10","parent_id":null,"children":[{"id":"2","name":"Subfolder of 1","home_for_user":"33","home_for_user_group":null,"children":[{"id":"3","name":"Subfolder of 2","home_for_user":"44","home_for_user_group":null}]}]},"description":"JSON representation of a Folder.\n","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"home_for_user":{"type":"string","description":"If the folder is a home folder for a user this field contains the ID of that user. Otherwise it's null.\n"},"home_for_user_group":{"type":"string","description":"If the folder is a home folder for a user group this field contains the ID of that group. Otherwise it's null.\n"},"parent_id":{"type":"string","description":"Optional property. If present contains either the ID of the parent folder\nor null if the requested folder is root.\n"},"children":{"type":"array","items":{"type":"Folder"},"description":"Optional property. If present contains either the immediate children or all descendant folders.\n"}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to create this Folder. In practice this means that you lack\nCreate permissions on the parent Folder).\n"}}}},"/folders/{folder_id}/update":{"post":{"summary":"Update Folder","tags":["Folders"],"description":"> Example of JSON that could be used update a Folder:\n\n```json\n{\n \"name\": \"new child folder of 1\",\n \"parent_id\": \"1\"\n}\n```\n\n> For examples of the JSON output, see details of \"View Folder\".\n\nThis endpoint allows you to update the Folder's meta data, or to change\nits parent ID (i.e. to move this Folder so that it is the child of a\ndiffernt Folder).\n\nThe JSON input must be passed, URL-encoded, via the `folder` form data\nfield.\n\nWhen updating the `parent_id`, the following rules are in force:\n\n+ Only internal Scrive admins can promote a child Folder to a root.\n+ A root Folder may by subordinated to (i.e. made a child of) another\nFolder if you have permissions to modify the new parent and Folder\nbeing moved.\n+ A child Folder may be moved to be a child of another Folder as long\nas you have permissions to update the Folder being moved, the new parent and\nthe old parent.\n\nThe endpoint supports partial updates. This means that only the fields you\nsupply in your requests will have their values altered. Neither field is\nrequired, providing `{}` as your update JSON is essentially a \"no op\".\n\nA full Folder JSON response is returned which displays the state _after_\nthe update operation has been performed. Performing `/update` and then\nusing the `GET` endpoint should produce the same output both times.\n\n**Important Note**: *You cannot move Folders by updating the `children`\nfield, it must be done via `parent_id`*.\n","parameters":[{"name":"folder_id","in":"url","type":"string","description":"The ID of the Folder whose contents you wish to list","required":true},{"name":"folder","in":"formData","type":"string","format":"application/json","description":"JSON object containing details of the folder to be updated.\n","example":{"name":"new child folder of 1","parent_id":"1"}}],"responses":{"200":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","type":"object","example":{"id":"1","name":"Root folder","home_for_user":null,"home_for_user_group":"10","parent_id":null,"children":[{"id":"2","name":"Subfolder of 1","home_for_user":"33","home_for_user_group":null,"children":[{"id":"3","name":"Subfolder of 2","home_for_user":"44","home_for_user_group":null}]}]},"description":"JSON representation of a Folder.\n","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"home_for_user":{"type":"string","description":"If the folder is a home folder for a user this field contains the ID of that user. Otherwise it's null.\n"},"home_for_user_group":{"type":"string","description":"If the folder is a home folder for a user group this field contains the ID of that group. Otherwise it's null.\n"},"parent_id":{"type":"string","description":"Optional property. If present contains either the ID of the parent folder\nor null if the requested folder is root.\n"},"children":{"type":"array","items":{"type":"Folder"},"description":"Optional property. If present contains either the immediate children or all descendant folders.\n"}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to update this Folder. In practice this means that you lack\nUpdate permissions on the Folder.\n"}}}},"/folders/{folder_id}/delete":{"post":{"summary":"Delete Folder","tags":["Folders"],"description":"\nThis endpoint allows you to delete a Folder.\n\nIt's worth noting that you may only delete child Folders. Root Folders\ncan only deleted by internal Scrive admins. We also do not support recursive\ndeletion. If this is required, it can be implemented client-side by simply\nworking up the tree, deleting the leaves.\n","parameters":[{"name":"folder_id","in":"url","type":"string","description":"The ID of the Folder you wish to delete","required":true}],"responses":{"200":{"description":"JSON object showing that a Folder with the given ID has been\nsuccessfully deleted.\n"},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to create this Folder. In practice this means that you lack\nDelete permissions on the Folder).\n"}}}},"/folders/{folder_id}/list":{"get":{"summary":"List Documents in Folder","tags":["Folders"],"description":"> Example of a Folder Listing\n\n```json\n{\n \"total_matching\": 2,\n \"documents\": [\n ,\n \n ]\n}\n```\n\nThis endpoint is used to get the details of the documents in a given folder.\n\nOther than the JSON fields shown above, which wrap the output data in a list\nand show a little metadata, the document JSON for each item in `\"documents\"`\nis structured the same as it would be for endpoints that display a given\ndocument. _(See the [Document Definition](#document-3) documentation for\ndetails)._\n","parameters":[{"name":"folder_id","in":"url","type":"string","description":"The ID of the Folder whose contents you wish to list","required":true}],"responses":{"200":{"description":"JSON object which states the number of documents in the folder and lists\nthe JSON respresentations of those documents. (See Documents in\nDefinitions)\n","properties":{"total_matching":{"type":"integer"},"documents":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}}}},"403":{"description":"Insufficient Permissions error (this means that you don't have enough\npermissions to create this Folder. In practice this means that you lack\nRead permissions on the Folder)\n"}}}}},"definitions":{"Document":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}},"DocumentStatus":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"Signatory":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"SignatoryFieldName":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},"SignatoryFieldEmailMobile":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},"SignatoryFieldSignature":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},"SignatoryFieldStandard":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},"SignatoryFieldCheckbox":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},"SignatoryFieldRadiogroup":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},"SignatoryFieldCustomText":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}},"ListFilter":{"$schema":"http://json-schema.org/draft-04/schema#","title":"List Filter","description":"Parameter used to filter documents for the `list` API call.","type":"array","default":[],"example":[{"filter_by":"status","statuses":["preparation","pending"]}],"items":{"anyOf":[{"title":"Filter by status","type":"object","properties":{"filter_by":{"type":"string","enum":["status"]},"statuses":{"items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"type":"array"}}},{"title":"Filter by mtime","type":"object","properties":{"filter_by":{"type":"string","enum":["mtime"]},"start_time":{"format":"date-time","type":"string"},"end_time":{"format":"date-time","type":"string"}}},{"title":"Filter by tag","type":"object","properties":{"filter_by":{"type":"string","enum":["tag"]},"value":{"type":"string"},"name":{"type":"string"}}},{"title":"Filter by author","description":"Only include documents where the person making the API call is the\ndocument author.\n","type":"object","properties":{"filter_by":{"type":"string","enum":["is_author"]}}},{"title":"Signable on pad","description":"This implicitly adds an `is_author` filter.\n","type":"object","properties":{"filter_by":{"type":"string","enum":["is_signable_on_pad"]}}},{"title":"Only templates","type":"object","properties":{"filter_by":{"type":"string","enum":["is_template"]}}},{"title":"Only non-templates","type":"object","properties":{"filter_by":{"type":"string","enum":["is_not_template"]}}},{"title":"In trash","type":"object","properties":{"filter_by":{"type":"string","enum":["is_in_trash"]}}},{"title":"Not in trash","type":"object","properties":{"filter_by":{"type":"string","enum":["is_not_in_trash"]}}},{"title":"Filter by author id","type":"object","properties":{"filter_by":{"type":"string","enum":["author"]},"user_id":{"type":"string"}}},{"title":"Signable by user","type":"object","properties":{"filter_by":{"type":"string","enum":["user_can_sign"]},"user_id":{"type":"string"}}},{"title":"Filter by text","type":"object","properties":{"filter_by":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}},"ListSorting":{"$schema":"http://json-schema.org/draft-04/schema#","title":"List Sorting","description":"Parameter used to sort documents for the `list` API call.","type":"array","example":[{"sort_by":"author","order":"ascending"}],"items":{"type":"object","properties":{"order":{"default":"ascending","type":"string","enum":["ascending","descending"]},"sort_by":{"type":"string","enum":["title","status","mtime","author"]}},"required":["sort_by"]}},"AuthorAttachments":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Author Attachments","description":"Attachments that have been added to a document by the author.","type":"array","items":{"anyOf":[{"type":"object","required":["name","required","add_to_sealed_file","file_param"],"description":"Attachment that is uploaded as part of the API call.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"add_to_sealed_file":{"type":"boolean","description":"Whether to add the attachment to the sealed file after signing\n"},"file_param":{"type":"string","description":"The parameter name used in the API call for this attachment.\n"}}},{"type":"object","required":["name","required","add_to_sealed_file","file_id"],"description":"Attachment that references a `file_id`.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"add_to_sealed_file":{"type":"boolean","description":"Whether to add the attachment to the sealed file after signing\n"},"file_id":{"type":"integer"}}}]},"example":[{"name":"Attachment using ID","required":false,"add_to_sealed_file":true,"file_id":"36"},{"name":"Attachment using parameter","required":false,"add_to_sealed_file":true,"file_param":"file_1"}]},"HistoryItems":{"$schema":"http://json-schema.org/draft-04/schema#","title":"History Items","description":"The type returned by the Document History API call.\n\nThis can be used to show the progress of a document to the user.\n","type":"object","example":{"events":[{"status":"initiated","time":"2015-06-06T17:50:15Z","party":"Not named party (1)","text":"The signing process was initiated."}]},"properties":{"events":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["initiated","draft","cancelled","rejected","timeouted","problem","deliveryproblem","sent","delivered","read","opened","signed","prolonged","sealed","extended"],"description":"The document status \"class\", not the same as the statuses\navailable for documents.\n"},"time":{"format":"date-time","type":"string"},"text":{"type":"string","description":"The text describing the action."},"party":{"type":"string","description":"The name of the party performing the action."}}}}}},"Attachment":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Attachment","type":"object","description":"A pre-uploaded attachment which can later be used when creating or signing\ndocuments.\n","properties":{"id":{"description":"**Unique identifier for an attachment.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the attachment.**\n\nThe title will be used when listing attachments.\n","readOnly":true},"file":{"type":"string","description":"**The attachment’s file ID.**\n","readOnly":true},"shared":{"type":"boolean","description":"**Sharing status.**\n\nWhether the attachment is shared with the other members of the company.\n"},"time":{"description":"Time at which the attachment was added.","type":"string","format":"date-time","readOnly":true}},"example":{"id":"2","title":"Terms and conditions","time":"2018-06-21T08:25:22.644059Z","shared":false,"file":"2"}},"AttachmentListFilter":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Attachment List Filter","description":"Parameter used to filter attachments for the `list` API call.","type":"array","default":[],"example":[{"filter_by":"text","text":"keyword"}],"items":{"anyOf":[{"title":"Filter by text","type":"object","properties":{"filter_by":{"type":"string","enum":["text"]},"text":{"type":"string"}}}]}},"DataRetentionPolicy":{"$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","type":"object","description":"An object with data retention policy properties.\n","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}},"DataRetentionPolicies":{"$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicies","type":"object","description":"An object with data retention policies properties.\n","example":{"company_data_retention_policy":{"immediate_trash":false},"data_retention_policy":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32}},"properties":{"company_data_retention_policy":{"type":"object","$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","description":"An object with data retention policy properties.\n","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}},"data_retention_policy":{"type":"object","$schema":"http://json-schema.org/draft-04/schema#","title":"DataRetentionPolicy","description":"An object with data retention policy properties.\n","example":{"idle_doc_timeout_canceled":45,"immediate_trash":true,"idle_doc_timeout_error":67,"idle_doc_timeout_preparation":32},"properties":{"immediate_trash":{"type":"boolean","description":"Option to delete documents in trash immediately\n"},"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days before moving documents in preparation to trash\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days before moving closed documents to trash\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days before moving cancelled documents to trash\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days before moving timed out documents to trash\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days before moving rejected documents to trash\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days before moving documents with errors to trash\n"}}}}},"OAuthAuthorization":{"$schema":"http://json-schema.org/draft-04/schema#","title":"OAuthAuthorization","type":"object","description":"","properties":{"apitoken":{"type":"string"},"apisecret":{"type":"string"},"accesstoken":{"type":"string"},"accesssecret":{"type":"string"}}},"UserStats":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserStats","type":"object","example":{"stats":[{"date":"2019-01-03","name":"Organisation total","sent":1,"closed":1,"signatures":1,"user_stats":[{"date":"2019-01-03","email":"demo@scrive.com","name":" ","sent":1,"closed":1,"signatures":1}]}]},"description":"A JSON object with the statistics on usage:\n count of documents on different stages of the process\n","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"},"user_stats":{"type":"array","required":false,"description":"Only present when the `withCompany` flag is set\n","items":{"type":"object","properties":{"date":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"sent":{"type":"integer"},"closed":{"type":"integer"},"signatures":{"type":"integer"}}}}}}}}},"LoginToken":{"$schema":"http://json-schema.org/draft-04/schema#","title":"LoginToken","type":"object","example":{"login_token":"a537e5e43d5b4095","qr_code":"iVBORw0KGgoAAAANSUhEUgAAAzQAAAM0AQMAAABXvPU0AAAABlBMVEUAAAD///+l2Z/dAAAAAnRSTlP//8i138cAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAL8SURBVHic7dpLbuswDAVQ70D736V34AJFLFKfpJ28B9A9HBiRLd6jIWHnuP5PHRwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOh8PhcP6Cc8zV+oOWL9d15l3fy88BHA6Hw+Fw6jrp/ib9Tno5rQe3DwEcDofD4XDqO9G6ZyP4HkZ+F8DhcDgcDucxTl4ePfgc30608cLhcDgcDufZTsTt9x0bkcPhcDgczsOcXVx+J3F/wnjVmTN3ARwOh8PhcIo7Uw39v7qsARwOh8PhcEo7+4oRZK03mdutHA6Hw+FwKjpTVyzyHxsGNkaQacv6+YPD4XA4HE5JJ1pfdS5xkRnnyQdoPeXISw6Hw+FwOFWdiVjS7/5pyBjiesfxad7hcDgcDodTxckvIebXDD0uDhD7diMIh8PhcDicRzjRPyUty2MM3g4e04DC4XA4HA6npJNDhsxd625LHlWGo3A4HA6Hw6nqTA15GV1TyJl/LQe9OBwOh8PhFHc+zCFn77qD81HOvCWecjgcDofDqe9Mo8UxVo6LA1wLlscSDofD4XA41Z0sRkjL95bpIyqIYTOHw+FwOJz6zkKcY8M9gkzjxpCZH3A4HA6HwyntBJHfSdwhMYJMw0iePoZf7+YQDofD4XA4xZwl6crEMocMbfH0WorD4XA4HE5dZ3kxcTvLr3tzXN62cTgcDofDqevc40bUFJIfDaPKm3QOh8PhcDiPcV7p072rO63HfTrAz3MIh8PhcDicEs6Uvtjn5hSrM+VxOBwOh8Op6uxq15XtH8/I4XA4HA6ntHPMFUPGd8P0ReO+92HzxeFwOBwOp7zThid9mfuvhQh7OW3K43A4HA6HU9eJHctyqpYPMD27luJwOBwOh/Mgp/Xnw7gxvaLIbzGOcR+Hw+FwOJzHOcf49WIIycSVD/Vq43A4HA6H8whnx+6SdnPI7igcDofD4XCKO1Otc0hO31XrR7lPxuFwOBwOp7TzT4vD4XA4HA6Hw+FwOBwOh8PhcDgcDofD4XA4HM5znS/lqLjLlQGH4gAAAABJRU5ErkJggg==","expiration_time":"2019-02-25 10:50:00.507433116 UTC"},"description":"Returns a JSON containing `login_token`, `qr_code` and `expiration_time`.\n","properties":{"login_token":{"type":"string"},"qr_code":{"type":"string"},"expiration_time":{"type":"string"}}},"LanguageCode":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"User":{"$schema":"http://json-schema.org/draft-04/schema#","title":"User","type":"object","example":{"id":"1","fstname":"Arthur","sndname":"Dent","email":"arthur.dent@scrive.com","twofactor_active":false,"twofactor_is_mandatory":false,"personalnumber":"197910124242","phone":"+444242424242","companyadmin":true,"companyposition":"Hitchhiker","lang":"en"},"description":"JSON representation of a User.\n","properties":{"id":{"type":"string"},"fstname":{"type":"string"},"sndname":{"type":"string"},"email":{"type":"string"},"sysauth":{"type":"string"},"home_folder_id":{"type":"string"},"twofactor_active":{"type":"boolean"},"twofactor_is_mandatory":{"type":"boolean"},"personalnumber":{"type":"string"},"phone":{"type":"string"},"companyadmin":{"type":"boolean"},"companyposition":{"type":"string"},"lang":{"type":"string"}}},"UserGroup":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroup","type":"object","example":{"id":"1","parent_id":null,"name":"A Root Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"contact_details":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"tags":[{"name":"alignment","value":"chaotic good"}]},"description":"JSON representation of a User Group.\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}},"UserGroupWithInheritable":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupWithInheritable","type":"object","example":{"id":"5","parent_id":"1","name":"A Child Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false},"inheritable_preview":{"inherited_from":"1","data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":null,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":23,"idle_doc_timeout_error":null,"immediate_trash":true}}},"contact_details":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"},"inheritable_preview":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}}},"tags":[{"name":"home-planet","value":"Earth"}]},"description":"JSON representation of a User Group (with Inheritable Previews).\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettingsWithInheritable","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false},"inheritable_preview":{"inherited_from":1,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":null,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":23,"idle_doc_timeout_error":null,"immediate_trash":true}}},"description":"JSON representation of a User Group's Settings (with Inheritable Preview).\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetailsWithInheritable","type":"object","example":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"},"inheritable_preview":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}}},"description":"JSON representation of a User Group's Contact Details (with Inheritable\nPreview).\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}},"UserGroupSettings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"UserGroupSettingsWithInheritable":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettingsWithInheritable","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false},"inheritable_preview":{"inherited_from":1,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":null,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":23,"idle_doc_timeout_error":null,"immediate_trash":true}}},"description":"JSON representation of a User Group's Settings (with Inheritable Preview).\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}}}},"UserGroupContactDetails":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"UserGroupContactDetailsWithInheritable":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetailsWithInheritable","type":"object","example":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"},"inheritable_preview":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}}},"description":"JSON representation of a User Group's Contact Details (with Inheritable\nPreview).\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}}}},"Tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"AccessRole":{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccessRole","type":"object","example":{"id":"8","is_generated":false,"role_type":"user_group_admin","source":{"type":"user","id":"2"},"target":{"type":"user_group","id":"11"}},"description":"JSON representation of an Access Role.\n","properties":{"id":{"type":"string"},"is_generated":{"type":"boolean"},"role_type":{"type":"string","enum":["user","user_group_member","user_admin","user_group_admin","document_admin"]},"source":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group"]},"id":{"type":"string"}}},"target":{"type":"object","properties":{"type":{"type":"string","enum":["user","user_group","folder"]},"id":{"type":"string"}}},"allowed_actions":{"type":"object","properties":{"document":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"folder_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_group_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_personal_token":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}},"user_policy":{"type":"array","items":{"type":"string","enum":["create","delete","read","update"]}}}}}},"Folder":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Folder","type":"object","example":{"id":"1","name":"Root folder","home_for_user":null,"home_for_user_group":"10","parent_id":null,"children":[{"id":"2","name":"Subfolder of 1","home_for_user":"33","home_for_user_group":null,"children":[{"id":"3","name":"Subfolder of 2","home_for_user":"44","home_for_user_group":null}]}]},"description":"JSON representation of a Folder.\n","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"home_for_user":{"type":"string","description":"If the folder is a home folder for a user this field contains the ID of that user. Otherwise it's null.\n"},"home_for_user_group":{"type":"string","description":"If the folder is a home folder for a user group this field contains the ID of that group. Otherwise it's null.\n"},"parent_id":{"type":"string","description":"Optional property. If present contains either the ID of the parent folder\nor null if the requested folder is root.\n"},"children":{"type":"array","items":{"type":"Folder"},"description":"Optional property. If present contains either the immediate children or all descendant folders.\n"}}}},"parameters":{"DocumentID":{"name":"document_id","in":"path","required":true,"description":"Unique identifier for a document.\nWill not change.\n","type":"integer","format":"int64"},"SignatoryID":{"name":"signatory_id","in":"path","required":true,"description":"Unique identifier for a signatory.\nThis value can change before document is made ready for signing, and should\nnot be used to identify signatories while document is a draft.\n","type":"integer","format":"int64"},"SignatoryParamForFile":{"name":"signatory_id","in":"formData","required":false,"x-internalOnly":true,"description":"**Internal use only**\n\nCan be supplied to authenticate as a specific signatory using session tokens.\n*i.e.* to get files from the signing page.\n","type":"integer","format":"int64"},"FileID":{"name":"file_id","in":"path","required":true,"description":"Unique identifier for a file available via Scrive.\n","type":"integer","format":"int64"},"ObjectVersion":{"name":"object_version","in":"formData","type":"integer","required":false,"description":"If provided, will check the document `object_version` and only perform the\noperation if these match.\nOtherwise you will get a `HTTP 409`.\n"},"SignParamFields":{"internalUseOnly":true,"name":"fields","in":"formData","type":"string","format":"application/json","required":true,"description":"Updated information as entered by the signatory."},"SignParamAuthType":{"internalUseOnly":true,"name":"authentication_type","in":"formData","type":"string","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"],"description":"The authentication method to be used for signing.\n\nNot including this parameter will omit this check even though signing\nrequires it.\n"},"SignParamAuthValue":{"internalUseOnly":true,"name":"authentication_value","in":"formData","type":"string","description":"If the `authentication_type` is not `standard`, then the value\nassociated with it (e.g. mobile number for `sms_pin`).\n"},"SignParamSMSPIN":{"internalUseOnly":true,"name":"sms_pin","in":"formData","type":"integer","description":"If the `authentication_method_to_sign` for the signatory is `sms_pin`\nthen SMS PIN also needs to be included.\n\nThis is independant of other parameters in this call.\n"},"SignParamAcceptedAttachments":{"internalUseOnly":true,"name":"accepted_author_attachments","in":"formData","type":"array","items":{"type":"integer","format":"int64"},"required":true,"description":"The list of author attachments which the signatory has seen and\ntherefore accepted.\n\nThe call will fail if not all author attachments with `required` set to\n`true` are included here.\n"}},"responses":{"Document":{"description":"The document metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document","type":"object","description":"Defines the entire structure of a document to be signed, including the\nparties, the processes to follow, etc.\nIt is a core data structure used throughout the Scrive Document API.\n","properties":{"id":{"description":"**Unique identifier for a document.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"title":{"type":"string","description":"**The title of the document.**\n\nCan be modified while a document is in preparation.\nThe title will be used in messages sent to the document’s parties.\n"},"parties":{"type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory","type":"object","description":"A signatory defines the details and process for each signing or non-signing\nparty to a document.\n","properties":{"id":{"description":"**Unique identifier for a party.**\n\nWill not change over time, and cannot be changed.\n","type":"string","readOnly":true},"user_id":{"description":"If this party has an account on the Scrive eSign system, it will be set\nhere.\n","type":["string","null"],"format":"int64","readOnly":true},"is_author":{"description":"Whether this party is the author of the document.","type":"boolean","readOnly":true},"is_signatory":{"description":"Deprecated, please use `signatory_role` instead.\nIf true, this party is a signatory to the document, otherwise\nthey are a viewer or an approver and will not sign the\ndocument. If both `is_signatory` and `signatory_role` are\npresent, `is_signatory` takes precedence if their values are\ninconsistent (this is done for backwards compatibility).\n","type":"boolean"},"signatory_role":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Role","description":"Signatory role: viewer, approver, or a signing party. Only signing\nparties can sign documents, viewers only have view access, and\napprovers can additionally approve or reject.\n","type":"string","enum":["viewer","signing_party","approver"]},"fields":{"description":"The signatory fields represent information requested from, or information\nabout, the signatory.\nThere are different types of fields, and the array can contain multiple\ninstances of the same type.\n\nCurrently, Scrive supports the following field types:\n* `SignatoryFieldName`: First and last name of the signatory.\n* `SignatoryFieldEmailMobile`: Email and mobile of the signatory.\n* `SignatoryFieldSignature`: A signature box placed on the document, for\n the signatory to draw their signature.\n* `SignatoryFieldStandard`: Company name and number, and personal number\n (AKA social security number).\n* `SignatoryFieldCheckbox`: Checkboxes of varying sizes.\n* `SignatoryFieldRadiogroup`: Radio buttons of varying sizes.\n* `SignatoryFieldCustomText`: A text field for any other information\n about, or requested, from the signatory.\n\nPlease read the detailed definition of each field type for more\ninformation.\nNew field types may be added at any point to extend Scrive eSign features.\n\nFields can have `placements`, which define where on the document they\nwill appear.\nSimilarly, a single field can have multiple placements on the document.\n\n**Note:** Some field types have _no effect_ without at least one placement.\n","type":"array","items":{"anyOf":[{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldName","description":"A signatory field for the name(s) of the party.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a name field.\n","enum":["name"]},"order":{"type":"integer","description":"Whether this is the first name (_i.e._ given name)\nor second name (_i.e._ last name or surname).\n\nPlease ensure that there is exacatly one first name and one second name\nfield, otherwise the signatory may not be asked for their name on the\nsigning page.\n","enum":[1,2]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","order"],"example":{"type":"name","order":1,"value":"John","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.26105263157894737,"yrel":0.0975609756097561,"wrel":0.07894736842105263,"hrel":0.024390243902439025,"fsrel":0.01263157894736842,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldEmailMobile","description":"A signatory field for email addresses and mobile numbers.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["email","mobile"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"editable_by_signatory":{"type":"boolean","default":false,"description":"Whether the signatory can edit a pre-filled value for this field.\nThis is useful when you have signatory details on file, but you want them\nto be able to modify their email or mobile if it has changed.\n\n**Note:** Setting this to `true` means a signatory will _always_ be able\nto change the value on the signing page.\nIf you want a signatory to authenticate with SMS PIN, please be aware\nthat this may affect your desired workflow.\n"},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"mobile","value":"+461234567890","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldSignature","description":"A signatory field for placing signature boxes on the document.\n","type":"object","properties":{"type":{"type":"string","enum":["signature"]},"name":{"type":"string","description":"A name for the signature field.\n\nThe signatory will not see the name of the signature field, however it\nwill be used in the Evidence Log as a reference.\n"},"signature":{"anyOf":[{"type":"null","description":"When the signatory has not yet drawn a signature."},{"type":"string","description":"The File ID of the signature drawn by the signatory."}],"readOnly":true},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be able to draw a signature.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"signature","name":"Signature 1","signature":"9215148251416996589","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.3510526315789474,"yrel":0.1796747967479675,"wrel":0.2736842105263158,"hrel":0.08292682926829269,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandard","description":"A signatory field for placing a number of standard text fields on the\ndocument:\n* Company name\n* Company number\n* Personal number (AKA social security number)\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify what type of field this is.\n","enum":["company","company_number","personal_number"]},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n\n**For the author**: the value will revert to that set in the account settings.\nTrying to set any other value will simply result in this field reverting\nback to information set in account settings.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"description":"If set, where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type"],"example":{"type":"company","value":"Scrive AB","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[{"xrel":0.09052631578947369,"yrel":0.2700892857142857,"wrel":0.09157894736842105,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCheckbox","description":"A signatory field for placing checkboxes on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a checkbox field.\n","enum":["checkbox"]},"name":{"type":"string","description":"A name for the checkbox.\n\nThe signatory will not see the name of the checkbox, however it will be\nused in the Evidence Log as a reference.\n"},"is_checked":{"type":"boolean","default":false,"description":"`true` when the checkbox is checked, `false` otherwise.\n\nSetting this to `true` on a document in preparation has the effect of\npre-checking the checkbox for the signatory.\n"},"is_obligatory":{"type":"boolean","default":true,"description":"Whether the signatory is obliged to check this checkbox in order to sign\nthe document.\n"},"should_be_filled_by_sender":{"default":false,"type":"boolean"},"placements":{"type":"array","description":"**Needs to be set, otherwise there will be no checkbox visible to the signatory.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nCheckboxes can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ checkboxes.\n","enum":[0.011538,0.021153,0.0423076]},"hrel":{"type":"number","description":"Height of placement, not used for checkboxes, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for checkboxes, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name"],"example":{"type":"checkbox","name":"Checkbox Name","is_checked":true,"is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.17526315789473684,"yrel":0.3382113821138211,"wrel":0.011538,"hrel":0,"fsrel":0,"page":1,"tip":"left","anchors":[]}]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldRadiogroup","description":"A signatory field for placing radio buttons on the document.\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a radio button group field.\n","enum":["radiogroup"]},"name":{"type":"string","description":"A name for the radiogroup.\n\nThe signatory will not see the name of the radiogroup, however it will be\nused in the Evidence Log as a reference.\n"},"values":{"type":"array","description":"An array of radio button option values.\nThe signatory will not see the name of the radio button values, however\nthey will be used in the Evidence Log as a reference.\n\nThese _must_ correspond one-to-one with the list of `placements`: that is\nthe length of `values` _must_ equal that of `placements` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `placements` and have at least 2 items.\nEach item must be unique and not an empty string.**\n","items":{"type":"string","description":"Empty strings are not allowed."}},"placements":{"type":"array","description":"Defines where the individual radio buttons should be placed on the\ndocument.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nThese _must_ correspond one-to-one with the list of `values`: that is the\nlength of `placements` _must_ equal that of `vales` and vice-versa,\notherwise an error is returned.\n\n**Must be equal in length to `values` and have at least 2 items.**\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width.\n\nRadio buttons can only be three sizes.\nThe numbers represent _small_, _medium_ and _large_ radio buttons.\n","enum":[0.014736,0.021052,0.025263]},"hrel":{"type":"number","description":"Height of placement, not used for radio buttons, must be 0.","enum":[0]},"fsrel":{"type":"number","description":"Font size of placement, not used for radio buttons, must be 0.","enum":[0]},"page":{"description":"The page number for this placement, starting from 1.\n\n**All radio buttons within the same group must be placed on the same page.**\n","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}}},"required":["type","name","selected_value","placements","values"],"example":{"type":"radiogroup","name":"Large Radio buttons","selected_value":"Radio button 2","placements":[{"xrel":0.7405263157894737,"yrel":0.3796747967479675,"wrel":0.025263,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7405263157894737,"yrel":0.4008130081300813,"wrel":0.021052,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]},{"xrel":0.7410526315789474,"yrel":0.4211382113821138,"wrel":0.014736,"hrel":0,"fsrel":0,"page":1,"tip":"right","anchors":[]}],"values":["Radio button 1","Radio button 2","Radio button 3"]}},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomText","description":"A custom signatory field for text values. Can be used for any\ntext-based information. Must be placed on the document, otherwise\nthe signatory will not be asked to fill in details. Provides an\noptional regular expression-based validation mechanism via the\n`custom_validation` field (see below).\n","type":"object","properties":{"type":{"type":"string","description":"Used to specify that this is a custom text field.\n","enum":["text"]},"name":{"type":"string","description":"A name for the custom field.\n\nThe name will be used as a placeholder value on the signing page, it will\nalso be used in the Evidence Log as a reference.\n"},"value":{"type":"string","description":"Either a pre-filled value, or the value entered by the signatory.\n","default":""},"is_obligatory":{"type":"boolean","default":true},"should_be_filled_by_sender":{"type":"boolean","default":false},"placements":{"description":"**Needs to be set, otherwise the signatory will not be asked or presented with this information.**\n\nDefines where this field should be placed on the document.\nThis is both for the signatory to fill out on the signing page, and for\nthe final sealed PDF.\n\nNote that this is an array, you can have multiple placements for the same\nfield.\n\nThe easiest way to set the `xrel`, `yrel`, etc. values is to create a\ntemplate in the document UI design view, and use those values.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldStandardPlacements","type":"array","default":[],"items":{"type":"object","properties":{"xrel":{"type":"number","description":"Position on the x-axis, from 0 to 1."},"yrel":{"type":"number","description":"Position on the y-axis, from 0 to 1."},"wrel":{"type":"number","description":"Width of placement, as proportion of total width, from 0 to 1.\n"},"hrel":{"type":"number","description":"Height of placement, as proportion of total height, from 0 to 1.\n"},"fsrel":{"type":"number","description":"Font size of placement, as proportion of total width, from 0 to 1.\n"},"page":{"description":"The page number for this placement, starting from 1.","type":"integer"},"tip":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementTip","anyOf":[{"type":"string","description":"From which side the arrow on the signing page should point\nto the field.\n","enum":["left","right"]},{"type":"null","description":"Let the signing page default to either `left` or `right`\ndepending on the field type.\n"}],"default":null},"anchors":{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldPlacementAnchor","type":"array","default":[],"items":{"type":"object","properties":{"text":{"type":"string"},"index":{"type":"integer"}}}}},"required":["xrel","yrel","wrel","hrel","fsrel","page"]}},"custom_validation":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"SignatoryFieldCustomValidation","type":"object","description":"Optional. Describes how to validate the input to this field using a\ncustom regular expression.\n","properties":{"pattern":{"type":"string","description":"Regular expression pattern for field validation.\n"},"positive_example":{"type":"string","description":"Example of an input that matches the pattern.\n"},"tooltip":{"type":"string","description":"Tooltip for the input text field.\n"}},"required":["pattern","positive_example","tooltip"]}]}},"required":["type","name"],"example":{"type":"text","name":"Custom Field Name","value":"","is_obligatory":true,"should_be_filled_by_sender":true,"placements":[{"xrel":0.29368421052631577,"yrel":0.3444940476190476,"wrel":0.10842105263157895,"hrel":0.025297619047619048,"fsrel":0.016842105263157894,"page":1,"tip":"right","anchors":[]}],"custom_validation":{"pattern":"^foo|bar|baz$","positive_example":"foo","tooltip":"Must be either 'foo', 'bar', or 'baz'."}}}]}},"sign_order":{"type":"integer","default":1},"sign_time":{"type":["string","null"],"format":"date-time","readOnly":true},"seen_time":{"type":["string","null"],"format":"date-time","readOnly":true},"read_invitation_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejected_time":{"type":["string","null"],"format":"date-time","readOnly":true},"rejection_reason":{"type":["string","null"],"readOnly":true,"description":"Will only have a value if the signatory rejected the document, and will\ncontain the message from the signatory to explain rejection.\nThe Document `display_options` needs to allow the signatory to write a\nreject reason (`allow_reject_reason`).\n"},"sign_success_redirect_url":{"description":"The URL to redirect this party after they have signed the document.\n","type":["string","null"],"format":"uri"},"reject_redirect_url":{"description":"The URL to redirect this party if they reject the document.\n","type":["string","null"],"format":"uri"},"email_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"mobile_delivery_status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Signatory Delivery Status","description":"The current delivery status.","type":"string","enum":["unknown","not_delivered","delivered","deferred"]},"csv":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"}}},"delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","pad","api"],"description":"Note that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface. Furthermore, `pad` delivery is referred to as \"In-person\".\n"},"authentication_method_to_view":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document before signing.\n"},"authentication_method_to_view_archived":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","verimi","nl_idin"],"description":"This setting forces signatories to authenticate using the supplied identification method to view the document once it has been signed and resides in the e-archive.\n"},"authentication_method_to_sign":{"type":"string","default":"standard","enum":["standard","sms_pin","se_bankid","no_bankid","dk_nemid","fi_tupas","onfido_document_check","onfido_document_and_photo_check"]},"confirmation_delivery_method":{"type":"string","default":"email","enum":["email","mobile","email_mobile","email_link","email_link_mobile","none"],"description":"Options allow delivery of the signed document as\n* `email` an attachment in email or\n* `mobile` a link in a text message or\n* `email_mobile` both of the two above or\n* `email_link` a link in an email or\n* `email_link_mobile` a link in both an email and a text message or\n* `none` no delivery at all.\n"},"allows_highlighting":{"type":"boolean","default":false,"description":"Whether the signatory can highlight pages of the PDF when viewing the\nsigning page.\n\nIf any highlights are performed, the evidence log states that they were\nperformed while the signatory was viewing the document.\n\nThe intention of this feature is **not** for the signatory to affect a\ncontract via highlighting, but simply for a point-of-sale situation to\nassist contract review.\n"},"hide_personal_number":{"type":"boolean","default":false,"description":"Whether the personal number should be hidden in the final PDF\nverification page and the Evidence Log.\n\nThis is to be used when the document will be distributed to a wider\naudience, and the personal number of the signatory should not be\navailable in the final document.\n\n**If the signatory has a placed field for their personal number, it will\nbe included in the final PDF**. So this solution only works when the\nfield does not have any placements.\n"},"highlighted_pages":{"type":"array","default":[],"readOnly":true,"description":"A list of highlights performed by the signatory.\n\nWhile a document is pending, highlights may be added, but will not appear\nin the document file PDF until after the document is closed.\n","items":{"type":"object","properties":{"page":{"type":"integer","description":"The page number which is highlighted (starts from `1`).\nEach signatory can only have one highlight per page.\n"},"file_id":{"type":"string","description":"The `file_id` for an image of the highlights.\n\nThe image dimensions will fit the ratio of the PDF page, and will be\nof a fixed colour and transparency.\n\nThis will be integrated into the final PDF once the document is\nclosed.\n"}}}},"attachments":{"type":"array","default":[],"items":{"type":"object","description":"An attachment requested from the signing party.\nAttachments requested from viewing only parties have no effect.\n","properties":{"name":{"type":"string","description":"A name for the requested attachment.\nWill be visible to the signatory when signing the document.\n"},"description":{"type":"string","description":"A description for the requested attachment.\nWill be visible to the signatory when signing the document alongside\nthe attachment name.\n"},"required":{"type":"boolean","default":true,"description":"Whether the signatory must upload this attachment.\nIf `false`, the signatory may choose not to upload this attachment\nwhen signing.\n"},"file_id":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"},"file_name":{"type":"string","description":"Will be present if and when the party uploads this attachment.\n"}}}},"api_delivery_url":{"description":"If the `delivery_method` is set to `api`, then this field will hold the\nrelative URL for the party.\n\nNote that `api` delivery is referred to as \"Link\" delivery in the Scrive Web\ninterface.\n\nThis will only be available after the signing process has been started,\nand will only be visible when accessing the document as the author.\n","type":["string","null"],"format":"uri"},"consent_module":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","description":"If present, a section will be shown asking the signatory to answer some\nquestions which must be answered by the signatory with either the positive\nor the negative option specified.\n","type":"object","properties":{"title":{"type":"string","description":"Section title.\n"},"questions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Question text.\n"},"positive_option":{"type":"string","desription":"Text for the positive answer.\n"},"negative_option":{"type":"string","desription":"Text for the negative answer.\n"},"response":{"type":"boolean","description":"Will be present when the party has answered the question. `true`\nwhen the signatory selected the positive response and `false`\nwhen the signatory selected the negative response.\n"},"detailed_description":{"type":"object","description":"Optional additional information to show the signatory.\n","properties":{"title":{"type":"string","description":"Title of the section. Will be shown in a button.\n"},"text":{"type":"string","description":"Explanation of the question. New lines are shown as is.\n"}}}}}}}}]}},"example":{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"editable_by_signatory":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"hide_personal_number":false,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null,"consent_module":{"title":"Handling of personal information","questions":[{"title":"Do you agree for your information to be processed?","positive_option":"Yes, I agree with the processing of my data.","negative_option":"No, I do not agree with any processing of my data.","response":null,"detailed_description":{"title":"More information","text":"Long extra information regarding the question can go here, and can be separated using newlines.\n\nThis is useful for long terms and conditions that come along with a question."}}]}}},"description":"**List of signing and viewing parties.**\n\nDefines their details, how the document is delivered to them, what\nauthentication method they must use, fields they must fill, fields placed\non the PDF, etc.\n"},"file":{"description":"**The document’s main file.**\n\nCan be `null` while a document is in preparation, but needs a file before\nthe signing process can start.\n","$schema":"http://json-schema.org/draft-04/schema#","title":"File","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}},"sealed_file":{"oneOf":[{"type":"null"},{"$schema":"http://json-schema.org/draft-04/schema#","title":"File","description":"A file that can be accessed using the\n[API call to download related files](#get-a-related-file).\n","type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}}}],"description":"**The cryptographically sealed file.**\n\nWill only exist for documents that have been closed.\nThis field may be `null` for a short period of time after a document has\nbeen signed by all parties, while the Scrive eSign system seals the\ndocument.\n"},"author_attachments":{"description":"**List of author attachments.**\n\nCan be updated during document preparation using the \"set author\nattachments\" (`/{document_id}/setattachments`) API call.\n","type":"array","items":{"type":"object","properties":{"name":{"type":"string","readOnly":true},"required":{"type":"boolean","readOnly":true},"add_to_sealed_file":{"type":"boolean","readOnly":true},"file_id":{"type":"string"}}},"readOnly":true},"ctime":{"description":"Time at which the document was created.","type":"string","format":"date-time","readOnly":true},"mtime":{"description":"Latest time at which the document was modified.","type":"string","format":"date-time","readOnly":true},"timeout_time":{"description":"Time after which the document will timeout if it has not been signed.\n","type":["string","null"],"format":"date-time","readOnly":true},"auto_remind_time":{"type":["string","null"],"format":"date-time","readOnly":true},"status":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Document Status","description":"The current document status.\n\nA document in \"preparation\" can be changed using the `update` call and the\nmain file can also be set or changed.\n\nOnce the document signing process has begun, the document will be \"pending\".\n\nOnce all parties have successfully signed the document is \"closed\" and cannot\nbe changed.\n","type":"string","enum":["preparation","pending","closed","canceled","timedout","rejected","document_error"]},"days_to_sign":{"type":"integer","default":90},"days_to_remind":{"type":["integer","null"]},"display_options":{"type":"object","properties":{"show_header":{"type":"boolean","description":"Whether to show the Scrive header on the signing page.\n"},"show_pdf_download":{"type":"boolean","description":"Whether to show an option to download the PDF on the signing page.\n"},"show_reject_option":{"type":"boolean","description":"Whether to allow signatories to reject a document.\n"},"allow_reject_reason":{"type":"boolean","description":"Whether to allow signatories to enter a plain text reason for\nrejecting a document.\n"},"show_footer":{"description":"Whether to show the Scrive footer on the signing page.\n","type":"boolean"},"document_is_receipt":{"description":"Whether the document is a receipt to be printed out, and thus should\nnot have the verification footer added.\n\n_Note:_ This reduces the durability of evidence for a document signed\nthrough Scrive eSign, and should only be used when absolutely\nnecessary.\n","type":"boolean"},"show_arrow":{"type":"boolean","description":"Whether to show the auto-scroll arrow on the signing page.\n"}}},"invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using email invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_invitation_message":{"description":"The invitation message to send to all parties at the start of the signing\nprocess when using SMS invitation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"sms_confirmation_message":{"description":"The confirmation message to send to all parties once the document has\nbeen signed when using SMS confirmation.\n\nDefault is blank meaning that a default message will be used.\n","type":"string","default":""},"lang":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Language Code","type":"string","description":"Currently supported language codes","enum":["da","de","el","en","es","et","fi","fr","is","it","lt","lv","nl","no","pt","sv"]},"api_callback_url":{"description":"The URL to perform an API callback request.\n\nPlease see [Callbacks](#callbacks) for details.\n","type":["string","null"],"format":"uri"},"object_version":{"description":"The document object version is auto-incremented by the Scrive eSign\nsystem each time an action is performed on it.\n\nTherefore this can be used as a rudimentary synchronisation mechanism to\nensure you are handling a document that has not changed.\n\nIt is not recommended to use this field unless you are building an\napplication with offline capabilities.\n","type":"integer","readOnly":true,"minimum":1},"access_token":{"type":"string","readOnly":true},"timezone":{"type":"string"},"tags":{"description":"**User defined set of names and values.**\n\nCan be used to manage categories of documents.\nThe list API call can filter based on document tags.\n","type":"array","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"is_template":{"type":"boolean"},"is_saved":{"description":"A ‘saved’ document will appear in the E-archive.\n","type":"boolean"},"is_shared":{"type":"boolean","readOnly":true},"is_trashed":{"type":"boolean","readOnly":true},"is_deleted":{"type":"boolean","readOnly":true},"viewer":{"type":"object","properties":{"role":{"type":"string","enum":["company_shared","company_admin","signatory"]},"signatory_id":{"type":"string"}}}},"example":{"id":"8222115557375075439","title":"Contract for Magnus","parties":[{"id":"189255","user_id":"1404","is_author":true,"is_signatory":false,"signatory_role":"viewer","fields":[{"type":"name","order":1,"value":"Gregory","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Davids","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noreply@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]}],"sign_order":1,"sign_time":null,"seen_time":null,"read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":false,"attachments":[],"highlighted_pages":[],"api_delivery_url":null},{"id":"189256","user_id":null,"is_author":false,"is_signatory":true,"signatory_role":"signing_party","fields":[{"type":"name","order":1,"value":"Magnus","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"name","order":2,"value":"Söderholm","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[]},{"type":"email","value":"noemail@scrive.com","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"mobile","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company","value":"Scrive","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"company_number","value":"","is_obligatory":false,"should_be_filled_by_sender":false,"placements":[]},{"type":"signature","name":"Signature 1","signature":"195174","is_obligatory":true,"should_be_filled_by_sender":false,"placements":[{"xrel":0.07894736842105263,"yrel":0.09962825278810408,"wrel":0.2736842105263158,"hrel":0.0758364312267658,"fsrel":0.0168,"page":1,"tip":"right","anchors":[]}]}],"sign_order":1,"sign_time":"2017-01-13T10:38:49.590815Z","seen_time":"2017-01-13T10:38:33.1783Z","read_invitation_time":null,"rejected_time":null,"rejection_reason":null,"sign_success_redirect_url":null,"reject_redirect_url":null,"email_delivery_status":"unknown","mobile_delivery_status":"unknown","has_authenticated_to_view":false,"csv":null,"delivery_method":"pad","authentication_method_to_view":"standard","authentication_method_to_view_archived":"standard","authentication_method_to_sign":"standard","confirmation_delivery_method":"none","allows_highlighting":true,"attachments":[],"highlighted_pages":[{"page":1,"file_id":"195173"}],"api_delivery_url":null}],"file":{"name":"contract.pdf","id":"195124"},"sealed_file":{"name":"contract.pdf","id":"195172"},"author_attachments":[],"ctime":"2017-01-13T10:38:17.916324Z","mtime":"2017-01-13T10:38:49.590815Z","timeout_time":"2017-04-13T22:59:59Z","auto_remind_time":null,"status":"closed","days_to_sign":90,"days_to_remind":null,"display_options":{"show_header":true,"show_pdf_download":true,"show_reject_option":true,"allow_reject_reason":true,"show_footer":true,"document_is_receipt":false,"show_arrow":true},"invitation_message":"","confirmation_message":"","lang":"en","api_callback_url":null,"object_version":26,"access_token":"da675b76d876abda","timezone":"Europe/London","tags":[],"is_template":false,"is_saved":true,"is_shared":false,"is_trashed":false,"is_deleted":false,"viewer":{"signatory_id":"189255","role":"signatory"}}}},"UserGroup":{"description":"The user group metadata as a JSON.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroup","type":"object","example":{"id":"1","parent_id":null,"name":"A Root Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"contact_details":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"tags":[{"name":"alignment","value":"chaotic good"}]},"description":"JSON representation of a User Group.\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettings","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false}},"description":"JSON representation of a User Group's Settings.\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetails","type":"object","example":{"inherited_from":null,"address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}},"description":"JSON representation of a User Group's Contact Details.\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}}},"UserGroupWithInheritable":{"description":"The user group metadata as a JSON (with Inheritable Previews).\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupWithInheritable","type":"object","example":{"id":"5","parent_id":"1","name":"A Child Usergroup","children":[{"id":"2","name":"Some child user group"},{"id":"3","name":"Yet another child user group"}],"settings":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false},"inheritable_preview":{"inherited_from":"1","data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":null,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":23,"idle_doc_timeout_error":null,"immediate_trash":true}}},"contact_details":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"},"inheritable_preview":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}}},"tags":[{"name":"home-planet","value":"Earth"}]},"description":"JSON representation of a User Group (with Inheritable Previews).\n","properties":{"id":{"type":"string"},"parent_id":{"type":"string"},"name":{"type":"string"},"children":{"type":"array","default":[],"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"settings":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupSettingsWithInheritable","type":"object","example":{"inherited_from":null,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":42,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":null,"idle_doc_timeout_error":null,"immediate_trash":false},"inheritable_preview":{"inherited_from":1,"data_retention_policy":{"idle_doc_timeout_preparation":null,"idle_doc_timeout_closed":null,"idle_doc_timeout_canceled":null,"idle_doc_timeout_timedout":null,"idle_doc_timeout_rejected":23,"idle_doc_timeout_error":null,"immediate_trash":true}}},"description":"JSON representation of a User Group's Settings (with Inheritable Preview).\n","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"data_retention_policy":{"type":"object","properties":{"idle_doc_timeout_preparation":{"type":"integer","description":"Number of days to retain the document after preparation\n"},"idle_doc_timeout_closed":{"type":"integer","description":"Number of days to retain the document after closed\n"},"idle_doc_timeout_canceled":{"type":"integer","description":"Number of days to retain the document after canceled\n"},"idle_doc_timeout_timedout":{"type":"integer","description":"Number of days to retain the document after timedout\n"},"idle_doc_timeout_rejected":{"type":"integer","description":"Number of days to retain the document after rejected\n"},"idle_doc_timeout_error":{"type":"integer","description":"Number of days to retain the document after error\n"},"immediate_trash":{"type":"boolean"}}}}}}},"contact_details":{"$schema":"http://json-schema.org/draft-04/schema#","title":"UserGroupContactDetailsWithInheritable","type":"object","example":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"},"inheritable_preview":{"inherited_from":"1","address":{"company_number":"5568166804","company_name":"Scrive","address":"Grev Turegatan 11A","zip":"114 46","city":"Stockholm","country":"Sweden"}}},"description":"JSON representation of a User Group's Contact Details (with Inheritable\nPreview).\n","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"inheritable_preview":{"type":"object","properties":{"inherited_from":{"type":"string"},"address":{"type":"object","properties":{"company_number":{"type":"string"},"company_name":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}}}}}},"tags":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Tags","type":"array","example":[{"name":"founded","value":"1846"},{"name":"status","value":"busy"}],"description":"**User defined set of name/value pairs.**\n\nEach tag must have `{\"name\": \"some-name\", \"value\": \"some-value\"}` format.\nIn the responses value is always a string.\nIn the requests you can also provide `null` value to delete a tag.\nOther value types lead to 400 Bad Request response.\n","default":[],"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}}}}},"APIError":{"description":"The JSON structured errors returned by the API.\n","schema":{"$schema":"http://json-schema.org/draft-04/schema#","title":"API Error","description":"The structure of errors returned by the Scrive Document API.","type":"object","properties":{"error_type":{"type":"string","enum":["server_error","request_failed","endpoint_not_found","invalid_authorisation","insufficient_privileges","resource_not_found","document_action_forbidden","request_parameters_missing","request_parameters_parse_error","request_parameters_invalid","document_object_version_mismatch","document_state_error","signatory_state_error","action_not_permitted","conflict_error"]},"error_message":{"type":"string"},"http_code":{"type":"integer","enum":[400,401,403,404,409,500,603]}},"example":{"error_type":"request_parameters_parse_error","error_message":"The parameter 'document' could not be parsed. Please refer to our API documentation. Error details: Invalid JSON","http_code":400}}}}}