Loading...

Send an Agreement

Finalizes the agreement and sends it to all parties.

Send request

  • POST https://api.zigned.io/rest/v2/agreements/[id]/send
  • Content-type: application/json
const fetch = require('node-fetch'); let url = 'https://api.zigned.io/rest/v2/agreements/9aaf52be-0c51-4445-82a1-a2789657700e/send'; let options = {method: 'POST', headers: {'x-zigned-api-key': 'Your API key'}}; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error('error:' + err));

Success response

Description

The agreement is returned in pending status

Details

  • HTTP Status: 201
  • Mime type: application/json

Response body

idString

The unique ID of the agreement

statusEnumeration

Status of the agreement.

Possible values:

  • draft
  • pending
  • fulfilled
test_modeBoolean

Indicates if the agreement is for testing purposes

issuerString | Null

Issuer of the agreement

sign_intentsArray | Null

Sign Intents of the agreement.

original_documentObject | Null

Original document to be signed.

signed_documentObject | Null

The signed and finished document.

created_atDateTime

The UTC date of when the agreement was created

updated_atDateTime

The UTC date of when the agreement was last updated

Code Example

{ "id": "bc08cbbd-d565-4d07-b219-71cb607a2216", "status": "pending", "test_mode": false, "issuer": "Example AB", "sign_intents": [{ "id": "4da3a490-db93-476b-ba24-f548e79f75ae", "email": "email@example.com", "status": "pending", "signing_room_url": "", "signing_session": { "id": "6b4a86ae-5f58-4836-828f-9e23cee2dba7", "status": "draft", "signing_session_events": [], "signed_at": "Tue, 11 Jan 2022 15:59:53 GMT", "signature_method": "Signature not initiated", "created_at": "Tue, 11 Jan 2022 15:59:53 GMT", "updated_at": "Tue, 11 Jan 2022 15:59:53 GMT" }, "created_at": "Tue, 11 Jan 2022 15:59:53 GMT", "updated_at": "Tue, 11 Jan 2022 15:59:53 GMT" }], "original_document": { "id": "7c7cfbc0-32c5-4a2b-8cd0-4e39585f9f03", "filename": "example.pdf", "mime_type": "application/pdf", "url": "www.zigned.se", "compatibility_check": "successful", "created_at": "Tue, 11 Jan 2022 15:59:53 GMT", "updated_at": "Tue, 11 Jan 2022 15:59:53 GMT" }, "signed_document": {}, "created_at": "Tue, 11 Jan 2022 15:59:53 GMT", "updated_at": "Tue, 11 Jan 2022 15:59:53 GMT" }

Error responses

Description

Something went wrong while trying to finalize the agreement. This can be due to missing data (such as missing a valid document to sign or a lack of Sign Intents).

Details

  • HTTP Status: 400
  • Mime type: application/json
  • Message: Could not finalize the agreement.

Code Example

{ "status": 400, "message": "Could not finalize the agreement." }

Notes

Required properties

To send an agreement it must have:

  • A PDF to be signed
  • At least one signintent