Create document via Template

Create document via Template

POST https://api.zapsign.com.br/api/v1/models/create-doc/

This endpoint allows you to create a document via Dynamic Template. You must send all the replacements data in JSON format and will get the response in JSON format as well.

Headers

Request Body

{
    "open_id": 5,
    "token": "eb9c367a-e62f-4992-8360-b0219deaeecc",
    "status": "pending",
    "name": "Employment Contract",
    "original_file": "https://zapsign.s3.amazonaws.com/pdf/62xxxxx-d8fc-4392-8575-f3c46c3cfc7a/df6bac91-2766-4182-8c8b-ded5287e4c0f.pdf",
    "signed_file": null,
    "created_at": "2020-04-16T03:33:46.241747Z",
    "last_update_at": "2020-04-16T03:33:46.241775Z",
    "signers": [
        {
            "token": "921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "sign_url": "https://app.zapsign.com.br/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "status": "new",
            "name": "João da Silva",
            "email": "",
            "phone_country": "",
            "phone_number": "",
            "times_viewed": 0,
            "last_view_at": null,
            "signed_at": null
        }
    ],
    "answers": [ // list of variables and responses in the dynamic model (if the document was created using a dynamic model).
        {
            "variable": "COMPLETE NAME",
            "value": "Name Test"
        },
        {
            "variable": "FULL ADDRESS",
            "value": "Address Test"
        }
    ]
}

Request

Response

After a successfull request, you should get a response like this:

Caution: the original_file and signed_file links are temporary and expires in 60 minutes. In case your system needs to save those links it is recommended that you save them in your own CDN or that you call the Detail document endpoint every time your user needs a valid URL that will expires in more 60 minutes.

{
    "open_id": 5,
    "token": "eb9c367a-e62f-4992-8360-b0219deaeecc",
    "status": "pending",
    "name": "Job contract",
    "original_file": "https://zapsign.s3.amazonaws.com/pdf/62xxxxx-d8fc-4392-8575-f3c46c3cfc7a/df6bac91-2766-4182-8c8b-ded5287e4c0f.pdf",
    "signed_file": null,
    "created_at": "2020-04-16T03:33:46.241747Z",
    "last_update_at": "2020-04-16T03:33:46.241775Z",
    "signers": [
        {
            "token": "921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "sign_url": "https://app.zapsign.co/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b",
            "status": "new",
            "name": "John Doe",
            "email": "",
            "phone_country": "",
            "phone_number": "",
            "times_viewed": 0,
            "last_view_at": null,
            "signed_at": null,
            "resend_attempts": null
        }
    ],
    "answers": [
        {
            "variable": "FULL NAME",
            "value": "Foo bar"
        },
        {
            "variable": "SOCIAL SECURITY NUMBER",
            "value": "999-99-XXXX"
        },
        {
            "variable": "FULL ADDRESS",
            "value": "2989 Heller Crossing Apt. 023 - Springfield, NY / 13347"
        }
    ]
}

What you should do with this response is send the signature link to the signer through your application.

The signature link consists of the route: https://app.zapsign.co/verificar/{signer_token}

Thus, in the example above, where we have one signer, you must send the following signature link: - https://app.zapsign.co/verificar/921c115d-4a6e-445d-bdca-03fadedbbc0b And now just wait for your signer to sign!

More than one signer?

If you want to add more signers, use the "Add Signer" endpoint, receive the new signer's token and send the signature link as explained above.

How to create a Dynamic Template at ZapSign

Enter our help center and check the step-by-step:

Last updated