listStatus endpoint include recipient status in response

Deadly 提交于 2019-12-25 01:49:38

问题


Is there a way to include the recipient statuses in the response body for the listStatus endpoint?

Here is the curl request I am making

curl -X PUT \
  https://na2.docusign.net/restapi/v2/accounts/XXXXX/envelopes/status?envelope_ids=request_body \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-DocuSign-Authentication: { ... }' \
  -d '{
    "envelopeIds": [
        "SOME ENVELOPE ID",
        "ANOTHER ENVELOPE ID"
    ]
  }'

Here is the result I am getting

{
    "resultSetSize": "76",
    "totalSetSize": "76",
    "startPosition": "0",
    "endPosition": "75",
    "nextUri": "",
    "previousUri": "",
    "envelopes": [
        {
            "status": "sent",
            "documentsUri": "/envelopes/XXXX/documents",
            "recipientsUri": "/envelopes/XXXX/recipients",
            "attachmentsUri": "/envelopes/XXXX/attachments",
            "envelopeUri": "/envelopes/XXXX",
            "envelopeId": "XXXX",
            "customFieldsUri": "/envelopes/XXXX/custom_fields",
            "notificationUri": "/envelopes/12da3965-99cb-4c2d-9d3d-587a32fca118/notification",
            "statusChangedDateTime": "2017-08-07T14:34:38.4530000Z",
            "documentsCombinedUri": "/envelopes/XXXX/documents/combined",
            "certificateUri": "/envelopes/XXXX/documents/certificate",
            "templatesUri": "/envelopes/XXXX/templates"
        },
        ...
    ]
}

In the documentation page, it shows an example response that includes

{
    "resultSetSize": "76",
    "totalSetSize": "76",
    "startPosition": "0",
    "endPosition": "75",
    "nextUri": "",
    "previousUri": "",
    "envelopes": [
        {
            "status": "sent",
            "documentsUri": "/envelopes/XXXX/documents",
            "recipientsUri": "/envelopes/XXXX/recipients",
            "attachmentsUri": "/envelopes/XXXX/attachments",
            "envelopeUri": "/envelopes/XXXX",
            "envelopeId": "XXXX",
            "customFieldsUri": "/envelopes/XXXX/custom_fields",
            "notificationUri": "/envelopes/12da3965-99cb-4c2d-9d3d-587a32fca118/notification",
            "statusChangedDateTime": "2017-08-07T14:34:38.4530000Z",
            "documentsCombinedUri": "/envelopes/XXXX/documents/combined",
            "certificateUri": "/envelopes/XXXX/documents/certificate",
            "templatesUri": "/envelopes/XXXX/templates",
            "recipients": {
              "signers": [
                {
                   "status": "sent",
                   ...
                }
              ]
            },
        },
        ...
    ]
}

I am not sure what I need to do to my original request to includes that recipients section in the response. Does anyone know if I am missing some kind of url param or body param or something?


回答1:


This is not possible in the Envelopes: listStatus endpoint, it seems the response which you are seeing in sample JSON is autocreated by Swagger for the Envelope class. If you want to see all the details in one call then you need to make such call for each envelope using below endpoint,

/restapi/v2/accounts/{{AccountIdVal}}/envelopes/{envelopeId}?include=custom_fields,recipients,tabs&advanced_update=true


来源:https://stackoverflow.com/questions/50646664/liststatus-endpoint-include-recipient-status-in-response

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!