1. 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:

      • 1{"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)

    1{ 2 "go_live_date": datetime(UTC formate), 3 "connection_name": "Docusign", 4 "config": { 5 "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3", 6 "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a", 7 "look_back": 0, 8 "point_of_contact": [] 9 } 10}
  • Response code: 200

    1{ 2 "account_id": 10256, 3 "accountmapping": [], 4 "config": { 5 "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3", 6 "look_back": 0, 7 "point_of_contact": [ 8 "venkat@123.com" 9 ], 10 "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a" 11 }, 12 "connection_name": "Docusign", 13 "connection_stage": "disconnected", 14 "connection_status": "", 15 "go_live_date": "Wed, 09 Jun 2021 01:59:42 GMT", 16 "id": 977, 17 "ipro_ingestion_source_id": 5, 18 "organization_id": 2, 19 "sample_transaction": "", 20 "sftp_user": "", 21 "status": 0 22}
  • Possible Errors:

    • If the account_id not provided.

      • status_code: 400

      • Response:

      • 1{"message": "Could't prosees your request without account_id"}
    • If the source_id not provided.

      • status_code: 400

      • Response:

      • 1{"message": "Could't prosees your request without source_id"}
    • For the post request if the request body is invalid or empty.

      • status_code: 400

      • Response:

      • 1{"message": "Cannot process request without request body}
    • If the credentials is not provided .

      • status_code: 422

      • Response:

      • 1{"message": Cannot process request without credentials}
    • 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)

    1{ 2 "source_setting_id": 965, 3 "go_live_date": datetime(UTC formate), 4 "connection_name": "Docusign", 5 "config": { 6 "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3", 7 "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a", 8 "look_back": 0, 9 "point_of_contact": ["venkat@123.com"] 10 } 11}
  • Response code: 200

  • 1{ 2 "account_id": 2, 3 "accountmapping": [], 4 "config": { 5 "docusign_account_id": "3d58d115-8a00-43e1-a93a-1636b51f053a", 6 "look_back": 0, 7 "point_of_contact": [ 8 "venkatadri@socialsurvey.com" 9 ], 10 "user_id": "af90af54-368d-47c7-aacd-d209a9303ee3" 11 }, 12 "connection_name": "Docusign", 13 "connection_stage": "default", 14 "connection_status": {}, 15 "go_live_date": "Mon, 21 Jun 2021 00:00:00 GMT", 16 "id": 965, 17 "ipro_ingestion_source_id": 5, 18 "organization_id": 2, 19 "sample_transaction": null, 20 "sftp_user": null, 21 "status": 0 22}
  • Possible Errors:

    • If the body not provided in the request.

      • status_code: 400

      • Response:

      • 1{"message": "Could't prosees your request without body"}
    • If the source_setting_id not provided in the request body.

      • status_code: 400

      • Response:

      • 1{"message": "Could't prosees your request without source_setting_id"}
    • If the config is not provided in the request body.

      • status_code: 422

      • Response:

      • 1{"message": "Cannot process request without request config"}
    • If the credentials is not provided .

      • status_code: 422

      • Response:

      • 1{"message": Cannot process request without credentials}
    • If the credentials already mapped to the same account.

      • status_code: 409

      • Response:

        1{"message": "Credentials already exist for this account"}
    • 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:

      • 1{"message": "Could't process your request without source_setting_id"}
    • If the look_back_days not provided in the params.

      • status_code: 400

      • Response:

      • 1{"message": "Could't processs your request without look_back_days"}
    • If the config is not available in IPRO for given source_setting_id.

      • status_code: 404

      • Response:

      • 1{"message": "Cannot Process your request without credentials"}
    • If the credentials is invalid.

      • status_code: 409

      • Response: error response

4. For the endpoints: