API Documentation - Docusign
Generate Refresh Token:
i. Get Method :
Endpoint:
/v2/docusign/ipro/sources/<source_id>/accounts/refresh_token
Methods: Get
Response code: 200
Possible Errors:
If the token code is not provided.
status_code: 422
Response:
{"message": "Please provide Authorization Code"}
2. Authorization and creating Config:
i. POST Method :
Endpoint:
/v2/docusign/ipro/source_settings/<source_id>/accounts/<account_id>/auth_token
Methods: POST
Body for POST method:(here go live date and connection_name is optional)
{ "go_live_date": datetime(UTC formate), "connection_name": "Docusign", "config": { "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3", "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a", "look_back": 0, "point_of_contact": [] } }
Response code: 200
{ "account_id": 10256, "accountmapping": [], "config": { "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3", "look_back": 0, "point_of_contact": [ "venkat@123.com" ], "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a" }, "connection_name": "Docusign", "connection_stage": "disconnected", "connection_status": "", "go_live_date": "Wed, 09 Jun 2021 01:59:42 GMT", "id": 977, "ipro_ingestion_source_id": 5, "organization_id": 2, "sample_transaction": "", "sftp_user": "", "status": 0 }
Possible Errors:
If the account_id not provided.
status_code: 400
Response:
If the source_id not provided.
status_code: 400
Response:
For the post request if the request body is invalid or empty.
status_code: 400
Response:
If the
credentials
is not provided .status_code: 422
Response:
If the credentials already mapped to the same account.
status_code: 409
Response:
{"message": "Credentials already exist for this account"}
if Given credentials are invalid.
status_code: 401
Response: error_response
ii. Put Method :
Updates the configuration of an account if it already exists.
Endpoint:
/v2/docusign/ipro/source_settings/<source_id>/accounts/<account_id>/auth_token
Methods: PUT
Body for PUT method:(here go live date and connection_name is optional)
Response code: 200
Possible Errors:
If the
body
not provided in the request.status_code: 400
Response:
If the
source_setting_id
not provided in the request body.status_code: 400
Response:
If the
config
is not provided in the request body.status_code: 422
Response:
If the
credentials
is not provided .status_code: 422
Response:
If the credentials already mapped to the same account.
status_code: 409
Response:
if Given credentials are invalid.
status_code: 401
Response: error_response
If the account configuration not exist in IPRO source settings table with given
source_setting_id
.status_code:
Response:
{"message": "Configuration not available for this account"}
3. Lookback :
To get the lookback report for an account:
The purpose of this API is to get the transactions for particular days as decided by the customer.
i. Get Method :
Endpoint:
/v2/docusign/ipro/source_settings/<source_setting_id>/accounts/look_back_report
?look_back_days=30
Method: Get
Params:
look_back_days
Response
status_code: 200
Response: It shows download option for Downloading CSV file in local.
Possible Errors:
If the
source_setting_id
not provided in the url.status_code: 400
Response:
If the
look_back_days
not provided in the params.status_code: 400
Response:
If the
config
is not available in IPRO for givensource_setting_id
.status_code: 404
Response:
If the credentials is invalid.
status_code: 409
Response:
error response
4. For the endpoints:
To get the source settings.
To get, update or create config schema.
To update the status of an account. Refer the documentation.https://buyersroad.atlassian.net/wiki/spaces/SSV2/pages/1843789828