Objective
How to send agreements on behalf of another user who is part of your account?
Environment
REST API Swagger App V6
Steps
For Send on behalf function, enable Advanced Account Sharing for the account so that users can give sending permissions to other users while sharing their account. For Advanced sharing, see Enabling Advanced Account Sharing.
Once User sharing is enabled, go through the following steps to Send on behalf:
Generating a Transient document:
- Go to https://secure.<shard>.adobesign.com/public/docs/restapi/v6.
- <shard> is the local environment where your account resides.
- <shard> is the local environment where your account resides.
- Under transientDocuments, click POST /transientDocuments.
- To generate token for Authorization, click the OAUTH ACCESS-TOKEN button.
- In x-on-behalf-of-user, provide the email of user you want to send on behalf of in the following format: email:test@email.com
- To select a File, click Choose File, and click Try it Out.
You receive a response such as following with transientDocumentId:
{"transientDocumentId":"3AAABLblqZhB9Mjo0mrIu_pSgrf5VsMaKM68_Vmn80cimaqiUAD2OxrPp2e5H8GvjfiOxj4d5B8bCPkUfvaozW3KLisp_wseGVOL8A7oNZni1DWyFi4uNoxLQu4nUO44Wh63GQv9_HEJMePust0Pk94vJ_rbS96R7ic-vl7jbOkN0b4EB5-JMqlC-Fl_Vpyz8I1EQUrM5I4nB9ztMov4ad00yiOtDw0tB-Y2t5JdzM07P-mpJmwYEl8Fq2IeDuWjcR2tV7qY7TNGX2CNyh9jt0aMyduHeYa0GABr69z8Hm76eKdtaM_1E1ggWj205fSrNcwJsnpSO278*"}
Generating an agreement using the Transient document:
- Under agreements, click POST /agreements.
- To generate token for Authorization, Click the OAUTH ACCESS-TOKEN button.
- In x-on-behalf-of-user, provide the email of the user as done while creating the Transient document.
- In AgreementInfo, add the following code, and click Try it out.
{ "fileInfos": [ { "transientDocumentId":"3AAABLblqZhB9Mjo0mrIu_pSgrf5VsMaKM68_Vmn80cimaqiUAD2OxrPp2e5H8GvjfiOxj4d5B8bCPkUfvaozW3KLisp_wseGVOL8A7oNZni1DWyFi4uNoxLQu4nUO44Wh63GQv9_HEJMePust0Pk94vJ_rbS96R7ic-vl7jbOkN0b4EB5-JMqlC-Fl_Vpyz8I1EQUrM5I4nB9ztMov4ad00yiOtDw0tB-Y2t5JdzM07P-mpJmwYEl8Fq2IeDuWjcR2tV7qY7TNGX2CNyh9jt0aMyduHeYa0GABr69z8Hm76eKdtaM_1E1ggWj205fSrNcwJsnpSO278*" } ], "name": "Test", "participantSetsInfo": [ { "memberInfos": [ { "email": "signer@email.com" } ], "order": 1, "role": "SIGNER" } ], "signatureType": "ESIGN", "state": "IN_PROCESS" }
You receive a response such as following with agreementId:
{ "id": "CBJCHBCAABAAUlen3l_fzlj1Kbn_wGZAhYcIgN0J7Qtq" }
Additional information
The Option for Send on behalf is available only in REST API V6 with Advanced sharing on.
If Send permission is not provided in sharing or if Advance Sharing is not enabled, you get a response such as following:
{"code":"PERMISSION_DENIED","message":"User provided in x-on-behalf-of-user header does not have required permission to perform this operation."}