Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Botdoc P2 Container is a session with multiple secure Features inside of it, with P2 you can make a Flow automation or just a simple file "push", "pull" or “DocuSign”.

Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/container/ 
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/container/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "page_type": "p2",
    "callback_url": "https://link.to.your.callback.url"
}"

...

After the Secure Container was created, you need to create the Recipient(s) of your Secure Container.
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/recipient/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/recipient/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
   "first_name": "John",
   "last_name": "Smith"
}
"

...

Now, we need to add our RecipientItem linked to the Recipient in the Step 2.
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
   "interface_class": "email",
   "value": "myemail@botdoc.io"
}
"

...

Now, if you want, you can protect your Secure Container with Two Factor Authentication.
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/authcode/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/authcode/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "container": "{container_id}",
    "send_as": "email", 
    "to": "myemail@botdoc.io"
}"

...

Now, you must inform the Email Message if in the previewer step the transport method was sent to Email.
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/email/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/email/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "subject": "nice subject",
    "body": "a nice message here"
}"

...

Now, you must inform the SMS Message if in the previewer step, the transport method was sent to SMS.
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/sms/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/sms/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "body": "a nice body here"
}"

...

If you want to request file(s) from your receiver, you must send a Pull Feature:
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container_pull/pull/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container_pull/pull/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "container": {container_id},
    "title": "Nice Pull Title",
    "description": "Nice Pull Desc."
}"

...

If you want to send file(s) to your Receiver, you must send a Push Feature:
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container_push/push/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container_push/push/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "container": {container_id},
    "title": "Nice Push Title",
    "description": "Nice Push Desc.",
    "max_file_downloads": 4
}"

...

If you want to request document(s) from your receiver, you must send a Push Feature and obligatorily a Push File:
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container_push/pushfile/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container_push/pushfile/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: multipart/form-data" \
--form "file=@C:\invoices\invoice_2020.pdf" \
--form "name=invoice_2020.pdf" \
--form "push={push_id}" \
--form "total_chunks=1"

...

If you want the Receiver to Sign something, you must send a DocuSign Feature:
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container_docusign/docusign/
Method: POST.

Example of the body in JSON format:

...

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container_docusign/docusign/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "title": "Sign this doc. pls",
    "description": "this document allows you to get an bank loan",
    "envelope": {
        "template_id": "f53858a0-4810-492a-aba7-8dda6eb83ffc",
        "recipients": {
            "signers": [
                {
                    "name": "John Smith",
                    "email": "myemail@botdoc.io",
                    "client_user_id": "{recipient_id}",
                    "role_name": "Signer"
                }
            ]
        }
    },
    "container": {container_id}
}"

...

Now, just send the Notification to the Receiver(s).
Endpoint: https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/send_notification/
Method: POST.

Example how to send a notification by cURL:

Code Block
languagejson
curl -i --request POST "https://sandboxapiapi.botdoc.io/v1/module_container/container/{container_id}/send_notification/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw ""

...