Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Monday, April 10, 2023 at 02:42pmIs it possible with text tag extraction to send two PDF documents with the payload? If so, can you share an example - we are not finding any examples? We are using the OSS ReST API to send payload data.
Reply to: Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Monday, April 10, 2023 at 03:32pmHi there,
Thanks for your post!
Yes, you can use text tags extraction on PDF and DOCX files (see attachments), and it's achievable to send multiple documents in a single call. The raw request body could look like below:
POST /api/packages HTTP/1.1
Authorization: Basic YkJxxxxxUg==
Accept: application/json
Content-Type: multipart/form-data; boundary=--------------------------398426008899708081112834
User-Agent: PostmanRuntime/7.28.4
Cache-Control: no-cache
Postman-Token: 6145bd2e-9584-41ae-ad4f-471ce7feeb76
Host: sandbox.esignlive.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 53606
----------------------------398426008899708081112834
Content-Disposition: form-data; name="payload"
{
"documents": [
{
"id": "document1",
"name": "document1",
"extract": true,
"extractionTypes": [
"TEXT_TAGS"
]
},
{
"id": "document2",
"name": "document2",
"extract": true,
"extractionTypes": [
"TEXT_TAGS"
]
}
],
"status": "DRAFT",
"type": "PACKAGE",
"roles": [
{
"id": "Signer1",
"type": "SIGNER",
"signers": [
{
"email": "[email protected]",
"firstName": "John",
"lastName": "Smith",
"id": "Signer1"
}
],
"name": "Signer1"
}
],
"name": "Text Tags Example Package"
}
----------------------------398426008899708081112834
Content-Disposition: form-data; name="file"; filename="text tag.docx"
<text tag.docx>
----------------------------398426008899708081112834
Content-Disposition: form-data; name="file"; filename="SampleDocTextTagsNew.pdf"
<SampleDocTextTagsNew.pdf>
----------------------------398426008899708081112834--
Duo
Reply to: Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Tuesday, April 11, 2023 at 11:04amExcellent, thank you for the super quick response and code sample. We now have working logic!
Reply to: Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Tuesday, April 11, 2023 at 03:05pmWould you happen to have an example of doing this using CURL in PHP? We've tried several ways of getting it to upload the files but instead it just creates empty docs with just the file path strings.
Reply to: Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Tuesday, April 11, 2023 at 03:36pmHi there,
Try the attached PHP code.
Duo
Reply to: Ability to send 2 DOCX files with a single payload for Text Tag Extraction
Wednesday, April 12, 2023 at 12:35pmThank you Duo. We made a successful call with two different forms (.docx and .pdf) using your code example.