get error "The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line."

StackOverflow https://stackoverflow.com/questions/22920054

  •  29-06-2023
  •  | 
  •  

質問

I am using SOAP request targeting DocuSign SandBox

I am sending this message (I removed most of PDFBytes content)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.docusign.net/API/3.0">
    <soapenv:Header/>
    <soapenv:Body>
        <ns:CreateAndSendEnvelope>
            <ns:Envelope>
                <ns:TransactionID>133C3780-C205-46D5-BEE4-0CD7ED2A5853</ns:TransactionID>
                <ns:AccountId>afd8e9ea-????-????-????-6d45ccf39d4f</ns:AccountId>
                <ns:Documents>
                    <ns:Document>
                        <ns:ID>1</ns:ID>
                        <ns:Name>Contract</ns:Name>
                        <ns:PDFBytes>JVBERi0xLjUNJeLjz9MNCjU4IDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDkyMTA4L08gNjAv
sN5FYFIW6Lv/sy6DZZlxkKxgkoERRHL8R7AhJMs/dBFMkvE3gs0ENoGRASDAAGBiHJsNCmVu
ZHN0cmVhbQ1lbmRvYmoNc3RhcnR4cmVmDQoxMTYNCiUlRU9GDQo=</ns:PDFBytes>
                        <ns:TransformPdfFields>false</ns:TransformPdfFields>
                    </ns:Document>
                </ns:Documents>
                <ns:Recipients>
                    <ns:Recipient>
                        <ns:ID>1</ns:ID>
                        <ns:UserName>Michel Hebert</ns:UserName>
                        <ns:Email>michel.hebert@ypg.com</ns:Email>
                        <ns:Type>Signer</ns:Type>
                        <ns:RoutingOrder>1</ns:RoutingOrder>
                        <ns:AutoNavigation>true</ns:AutoNavigation>
                        <ns:EmailNotification>
                            <ns:Subject>This is the subject</ns:Subject>
                            <ns:EmailBlurb>This is the test body of the message</ns:EmailBlurb>
                            <ns:Language>en</ns:Language>
                        </ns:EmailNotification>
                        <ns:SignInEachLocation>true</ns:SignInEachLocation>
                    </ns:Recipient>
                </ns:Recipients>
                <ns:Tabs>
                    <ns:Tab>
                        <ns:DocumentID>1</ns:DocumentID>
                        <ns:RecipientID>1</ns:RecipientID>
                        <ns:AnchorTabItem>
                            <ns:AnchorTabString>#?~SIGN{r}~?#</ns:AnchorTabString>
                            <ns:XOffset>0</ns:XOffset>
                            <ns:YOffset>0</ns:YOffset>
                            <ns:Unit>Pixels</ns:Unit>
                            <ns:IgnoreIfNotPresent>true</ns:IgnoreIfNotPresent>
                        </ns:AnchorTabItem>
                        <ns:Type>SignHere</ns:Type>
                    </ns:Tab>
                    <ns:Tab>
                        <ns:DocumentID>1</ns:DocumentID>
                        <ns:RecipientID>1</ns:RecipientID>
                        <ns:AnchorTabItem>
                            <ns:AnchorTabString>#?~INIT{r}~?#</ns:AnchorTabString>
                            <ns:XOffset>0</ns:XOffset>
                            <ns:YOffset>0</ns:YOffset>
                            <ns:Unit>Pixels</ns:Unit>
                            <ns:IgnoreIfNotPresent>true</ns:IgnoreIfNotPresent>
                        </ns:AnchorTabItem>
                        <ns:Type>InitialHere</ns:Type>
                    </ns:Tab>
                    <ns:Tab>
                        <ns:DocumentID>1</ns:DocumentID>
                        <ns:RecipientID>1</ns:RecipientID>
                        <ns:AnchorTabItem>
                            <ns:AnchorTabString>#?~NAME{r}~?#</ns:AnchorTabString>
                            <ns:XOffset>0</ns:XOffset>
                            <ns:YOffset>0</ns:YOffset>
                            <ns:Unit>Pixels</ns:Unit>
                            <ns:IgnoreIfNotPresent>true</ns:IgnoreIfNotPresent>
                        </ns:AnchorTabItem>
                        <ns:Type>FullName</ns:Type>
                    </ns:Tab>
                    <ns:Tab>
                        <ns:DocumentID>1</ns:DocumentID>
                        <ns:RecipientID>1</ns:RecipientID>
                        <ns:AnchorTabItem>
                            <ns:AnchorTabString>#?~DATE{r}~?#</ns:AnchorTabString>
                            <ns:XOffset>0</ns:XOffset>
                            <ns:YOffset>0</ns:YOffset>
                            <ns:Unit>Pixels</ns:Unit>
                            <ns:IgnoreIfNotPresent>true</ns:IgnoreIfNotPresent>
                        </ns:AnchorTabItem>
                        <ns:Type>DateSigned</ns:Type>
                    </ns:Tab>
                </ns:Tabs>
                <ns:AllowReassign>true</ns:AllowReassign>
            </ns:Envelope>
        </ns:CreateAndSendEnvelope>
    </soapenv:Body>
</soapenv:Envelope>

I get this error: The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line.

Can someone point to what I am missing?

Thanks

役に立ちましたか?

解決

You are missing the Subject and Email blurb at the envelope level like below:

        </ns:Tabs>
        <ns:Subject>This is the subject</ns:Subject>
        <ns:EmailBlurb>This is the test body of the message</ns:EmailBlurb>               
        <ns:AllowReassign>true</ns:AllowReassign>

but unless the multi-language feature is turned on for your account (demo or Prod) you will then get the following error:

 <faultstring>A requested plan item is not enabled for this account. Plan item: SignInEachLocation</faultstring>
 <faultactor>https://demo.docusign.net/api/3.0/dsapi.asmx</faultactor>

So you can contact support to ask them to enable the multi-language feature.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top