Skip to content

Creating Envelope Rest API Failure #26

@PavanKumarH

Description

@PavanKumarH

Hello I am getting the following error when I try to create an envelope

{
  "errorCode": "INVALID_REQUEST_BODY",
  "message": "The request body is missing or improperly formatted. Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'API_REST.Models.v2.document[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'documents.documentId', line 1, position 74."
}

SO docusign can't parse a json string in maven set up. Below is my json string passed as a Post Api body:

{"status":"sent","emailSubject":"Test","documents":{"documentId":"1","name":"TestPDF.pdf","documentBase64":"Actual encoded document will be passed here"},"recipients":{"signers":{"name":"Pavan Palegar","email":"pavankumar.hanumantharaya@yahoo.com","recipientId":"12","clientUserId":"12345","tabs":{"signHereTabs":{"documentId":"1","xPosition":100,"yPosition":525,"pageNumber":5}}}}}

I have followed the exact documentation as below:
https://www.docusign.com/developer-center/explore/features/embedding-docusign

Kindly, let me know what do you make of it.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions