如何使用API重新发送DocuSign信封?

huangapple go评论71阅读模式
英文:

How to resend Docusing envelope using API?

问题

我想使用信封ID重新发送文档,我尝试了以下代码,并且只想发送待签署者而不是所有签署者。

Using client As New HttpClient()
    client.BaseAddress = New Uri("https://demo.docusign.net/restapi/v2.1/")
    client.DefaultRequestHeaders.Accept.Clear()
    client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
    client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "eyJ0eXAiOiJNVCIsImFs.....")

    ' 重新发送信封
    Dim response = client.PutAsync($"envelopes/a5b268be-d0be-4103-a079-09d814c/resend", Nothing).Result
    If response.IsSuccessStatusCode Then
        Return "001: 邮件成功重新发送"
    Else
        Return "002: 重新发送邮件失败。错误:" & response.StatusCode
    End If
End Using

但我收到以下返回响应:

"StatusCode: 404, ReasonPhrase: '提供的URL未解析为资源。', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
X-Content-Type-Options: nosniff
X-DocuSign-TraceToken: a5890c7a-f183-4050-99d5-b72376a0b806
X-DocuSign-Node: DA3DFE181
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: no-cache
Date: Thu, 13 Jul 2023 09:39:40 GMT
Content-Length: 0
}}"

英文:

I want to resend docusing envelope using envelope id, I tried with following code and i want to send only pending signer instead of all signer.

`

           Using client As New HttpClient()
                client.BaseAddress = New Uri("https://demo.docusign.net/restapi/v2.1/")
                client.DefaultRequestHeaders.Accept.Clear()
                client.DefaultRequestHeaders.Accept.Add(New MediaTypeWithQualityHeaderValue("application/json"))
                client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "eyJ0eXAiOiJNVCIsImFs.....")

                ' Resend the envelope
                Dim response = client.PutAsync($"envelopes/a5b268be-d0be-4103-a079-09d814c/resend", Nothing).Result
                If response.IsSuccessStatusCode Then
                    Return "001:Mail resent successfully"
                Else
                    Return "002:" & "Failed to resend Mail. Error: " & response.StatusCode
                End If
            End Using          

`

But i am getting following return response

"StatusCode: 404, ReasonPhrase: 'The URL provided does not resolve to a resource.', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
X-Content-Type-Options: nosniff
X-DocuSign-TraceToken: a5890c7a-f183-4050-99d5-b72376a0b806
X-DocuSign-Node: DA3DFE181
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: no-cache
Date: Thu, 13 Jul 2023 09:39:40 GMT
Content-Length: 0
}}"

答案1

得分: 2

我认为在/envelopes/envelope_id之前可能缺少/accounts/account_id。

英文:

I believe you might be missing /accounts/account_id before /envelopes/envelope_id

huangapple
  • 本文由 发表于 2023年7月13日 17:43:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76678010.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定