Versions Compared

Key

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

...

Code Block
languagejson
curl -i --request POST "https://api.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"
}"

1.2 - Create a Container with a Requester:

To create a Container with a Requester attached, is simple, first of all, you need to create a Requester, if you don't have any Requester registered, follow the link: How to create a Requester

After that, we need to create a new Container adding our Requester, the process is simple, follow:

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

Example of the body in JSON format:

Code Block
languagejson
{
    "page_type": "p2",
    "requester": {requester_id}
}

Example how to create a Container with a Requester by cURL:

Code Block
languagejson
curl -i --request POST "https://api.botdoc.io/v1/module_container/container/" \
--header "Authorization: JWT <Authorization Token>" \
--header "Content-Type: application/json" \
--data-raw "{
    "page_type": "p2",
    "requester": {requester_id}
}"
Note

Remember that, whenever a Container with a Requester attached to it is sent, the Requester is duplicated to a table RequesterContainer, to keep the data concise with the data on the day and time of the Container was sent, in case of this requester is modified or even deleted.


2 - Define Recipient(s):

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

Example of the body in JSON format:

...