rsudhini | Posts: 3

Create package API, can we use data field to store some data

0 votes

Using create package API, Along with creating package, can we use also use data field to store some data.

This field value we use in when retrieve the package.

"data": {
    "additionalProp1": {},
    "additionalProp2": {},
    "additionalProp3": {}
  },

I am attaching the package request body

 

 

 


Duo_Liang | Posts: 3776

Reply to: Create package API, can we use data field to store some data

0 votes

Hi Ravinder,

 

Thanks for your post! And somehow I think your attachment was blocked by the CMS. I did a quick test specifying nested JSON in "data" node, and can successfully retrieve it back, the JSON I tested is:

  "data": {
    "obj1": {
      "item1": "value1",
      "item2": {
        "item21": "value2",
        "item22": "value3"
      }
    }
  }

Would you mind directly post the request body in plain text, or send to [email protected] so that I can try to reproduce the issue? And as a workaround, you can always encoding the properties, and add them as a string value.

 

Duo

 


rsudhini | Posts: 3

Reply to:

0 votes

Hi Duo Liang,

Thanks a lot for your prompt response

Please see the request body in plain text

{
    "roles": [
        {
            "id": "Signer1",
            "signers": [
                {
                    "lastName": "abc",
                    "firstName": "Test user1 ",
                    "email": "[email protected]",
                    "company": "[email protected]",
                    "language": "en"
                }
            ],
            "name": "Customer",
            "index": 1,
            "reassign": true,
            "emailMessage": {
                "content": "THIS IS TEST AGREEMENT."
            },
            "attachmentRequirements": [
                {
                    "description": "Please upload Purchase Order (PDF format).",
                    "required": false,
                    "name": "Attachment"
                }
            ]
        }
    ],
    "data": {
        "additionalProp1": {"env":"dev"}
    },
    "documents": [
        {
            "name": "Agreement_EN.pdf",
            "extract": true,
            "extractionTypes": [
                "TEXT_TAGS",
                "ACROFIELDS"
            ],
            "id": "Doc1"
        }        
    ],
    "name": "TEST_ID-00000943",
    "type": "PACKAGE",
    "language": "en",
    "emailMessage": "",
    "description": "ID-TEST-2020-06-09T18:30:00.000Z",
    "due": "2021-06-10T18:30:00.000Z",
    "visibility": "ACCOUNT",
    "status": "SENT",
    "autocomplete": true
}

 


Duo_Liang | Posts: 3776

Reply to:

0 votes

I was testing in US2 sandbox environment (https://sandbox.esignlive.com/api) and this is what I retrieved with the same package JSON in Postman:
2-18-3

So in your case, can you see other out-of-the-box data values from response? Like "origin" or "currentSignerProgress"? What if you put a string value "additionalProp1" :"some_string_value", can it be returned?

Also, can you share a package ID that you created?

 

Duo


rsudhini | Posts: 3

Reply to: Create package API, can we use data field to store some data

0 votes

I can see the out-of-the-box data values from response origin, currentSignerProgress, overallProgress

The key and value that I added using create package API is retrieved later using get package API

packaged ids created are v_7o_RRHmKtAJJQy0Gaxu90HcJ8=, rhfAY4VRSDc0Tfx4aPEWv-tNZr8=, txI7oIg4tDyyCaxdBQzHV6ONbdU=


Duo_Liang | Posts: 3776

Reply to: Create package API, can we use data field to store some data

0 votes

Hi Ravinder,

 

Unfortunately, due to the GDPR compliance, OneSpan Sign has removed the custom package attributes from the backoffice, so I can't check the actual values in your package JSON. Could you supply some code snippets how you retrieved the package JSON? With Java, .NET http client or Postman? A screenshot with debug break point or console print would be much appreciated. 

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off