ruby - Docusign Rails Getting Status -



ruby - Docusign Rails Getting Status -

i have implemented docusign in ruby on rails app. i'm trying status of send documents. can 1 1 using envelope id this.

response = client.get_envelope_recipients( envelope_id: envelope_id )

problem have page shows list of documents sent , want show status of each 1 along list. hard , time consuming status of each docs 1 1 envelope_id.

is there way can status of list of envelopes sent same account. wants know if there after user signs doc gets redirected specific url(then can update database status user signs doc)

yes docusign platform indeed allow query set of envelopes in single api phone call instead of one-by-one per envelope id, need create right api call. looking @ ruby library have referenced looks include call, it's called get_envelope_statuses , lets query envelopes through date ranges , statuses:

# public retrieves statuses of envelopes matching given query # # from_date - docusign formatted date/datetime. homecoming items after date. # # to_date - docusign formatted date/datetime. homecoming items date. # defaults time of call. # # from_to_status - status of envelope checked in from_date - to_date period. # defaults 'changed' # # status - current status of envelope. defaults status. # # returns array of hashes containing envelope statuses, ids, , similar information. def get_envelope_statuses(options={}) content_type = { 'content-type' => 'application/json' } content_type.merge(options[:headers]) if options[:headers] query_params = options.slice(:from_date, :to_date, :from_to_status, :status) uri = build_uri("/accounts/#{acct_id}/envelopes?#{query_params.to_query}") http = initialize_net_http_ssl(uri) request = net::http::get.new(uri.request_uri, headers(content_type)) response = http.request(request) json.parse(response.body) end

and here corresponding api phone call docusign rest api documentation.

ruby-on-rails ruby docusignapi docusign

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -