esign icon indicating copy to clipboard operation
esign copied to clipboard

Allow JSON webhook notifications

Open aesadde opened this issue 3 years ago • 1 comments

Hi @jfcote87 quick question about webhook events.

I've been testing the client but the webhook response always comes as XML but according to DocuSign docs it should be possible to get the response in JSON

Is this something that the library currently supports?

For reference, this is how I build an envelope notification

envelope.EventNotification = &model.EventNotification{
		EnvelopeEvents: []model.EnvelopeEvent{
			{EnvelopeEventStatusCode: "Sent"},
			{EnvelopeEventStatusCode: "Completed"},
			{EnvelopeEventStatusCode: "Declined"},
			{EnvelopeEventStatusCode: "Voided"},
		},
		LoggingEnabled:        true,
		RequireAcknowledgment: true,
		URL:                   webhook
	}

aesadde avatar Aug 26 '21 20:08 aesadde

Reading the code I think it's just a matter of running thegen-esign against the updated Swagger file.

Let me know if you accepted PRs for this, should be simple :)

aesadde avatar Aug 26 '21 21:08 aesadde