获取文档网址 [英] Get document url
问题描述
当我通过信封ID获取文档时:
When I get document by envelope id:
$testConfig=new \DocuSign\eSign\ApiClient($config);
$envelopeApi = new \DocuSign\eSign\Api\EnvelopesApi($testConfig);
$docsList = $envelopeApi->listDocuments($accountId, "4f4ec572-b7aa-4b42-96ed-3e85655efbaa");
//var_dump($docsList->getUrl());
//$this->assertNotEmpty($docsList);
//$this->assertNotEmpty($docsList->getEnvelopeId());
$docCount = count($docsList->getEnvelopeDocuments());
if (intval($docCount) > 0)
{
foreach($docsList->getEnvelopeDocuments() as $document)
{
print_r($document);
//$file = $envelopeApi->getDocument($testConfig->getAccountId(), $testConfig->getEnvelopeId(), $document->getDocumentId());
//$this->assertNotEmpty($file);
}
}
我得到以下答复。
但是返回的URL / envelopes / 4f4ec572-b7aa-4b42-96ed-3e85655efbaa / documents / certificate
是什么根域 code>?
But what is root domain for the returned url /envelopes/4f4ec572-b7aa-4b42-96ed-3e85655efbaa/documents/certificate
?
DocuSign\eSign\Model\EnvelopeDocument Object
(
[document_id:protected] => 1
[name:protected] => MojDoc.pdf
[type:protected] => content
[uri:protected] => /envelopes/4f4ec572-b7aa-4b42-96ed-3e85655efbaa/documents/1
[order:protected] => 1
[pages:protected] => 2
[contains_pdf_form_fields:protected] =>
[available_document_types:protected] => Array
(
[0] => DocuSign\eSign\Model\SignatureType Object
(
[type:protected] => electronic
[is_default:protected] => true
)
)
[error_details:protected] =>
)
DocuSign\eSign\Model\EnvelopeDocument Object
(
[document_id:protected] => certificate
[name:protected] => Summary
[type:protected] => summary
[uri:protected] => /envelopes/4f4ec572-b7aa-4b42-96ed-3e85655efbaa/documents/certificate
[order:protected] => 999
[pages:protected] => 4
[contains_pdf_form_fields:protected] =>
[available_document_types:protected] => Array
(
[0] => DocuSign\eSign\Model\SignatureType Object
(
[type:protected] => electronic
[is_default:protected] => true
)
)
[error_details:protected] =>
)
推荐答案
网址相对于帐户的 baseUrl
。初始 / login_information时,您会收到baseUrl 调用。
The urls are relative to the baseUrl
for the account. You received the baseUrl when you did your initial /login_information call.
请注意,如果用户有权访问多个帐户,则/ login_information方法返回多个帐户信息的情况并不罕见。
Note that it is not uncommon for the /login_information method to return multiple account information if the user has access to multiple accounts.
baseUrls不同。
baseUrls are different for each account.
这篇关于获取文档网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!