Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics

Hello,

I am trying to interface with OneSpan Sign using the REST API. I am using the LotusScript language on a HCL Notes / Domino platform.

Replies Created

Reply to: Package with one attachment reveive error 406 Not acceptable

0 votes

Hello Duo,

I changed the JSON to add the documents array.  I also removed a signer to make it simpler.  When I send the new JSON by itself (not a MIME package), the JSON is accepted and the package is created.

{
    "name": "Test PBE 2021-02-12 15:41:07",
    "type": "PACKAGE",
    "language": "fr",
    "emailMessage": "Veuillez signer le contrat ci-joint dans les plus bref délais.",
    "description": "Test PBE 2021-02-12 15:41:07",
    "autoComplete": true,
    "roles": [{
        "id": "1",
        "signers": [{
            "email": "[email protected]",
            "firstName": "Emmanuelle",
            "lastName": "Smith",
            "company": "Company Inc."
        }]
    }],
    "documents": [{
        "approvals": [{
            "role": "1",
            "fields": [{
                "page": "0",
                "top": "100",
                "subtype": "FULLNAME",
                "height": "50",
                "left": "100",
                "width": "200",
                "type": "SIGNATURE"
            }]
        }],
        "name": "Test Document"
    }],
    "status": "DRAFT"
}

When I include the PDF file with the new JSON in a MIME package, I get error 500 again.  Could it be a problem with my MIME formating?  I attached a text file with the entire MIME package.

Thanks again,

Patrick B.


Reply to: Package with one attachment reveive error 406 Not acceptable

1 votes

Hello Duo,

Adding a blank line before the JSON code fixed error 500.  But now I receive a error 400.

{"messageKey":"error.validation.documentPreVerifyInvalidResponseNumberError","parameters":{"errorException":"number of documents that need verification = 2, number of verification results = 0"},"message":"The number of Pre-Verify results does not match the number of documents that were sent for verification.","code":400,"name":"Validation Error"}

I do not see in the JSON or the MIME message where I indicate that there are two documents to verify.  I am using this guide as a reference (JAVA Rest):

https://community.onespan.com/documentation/onespan-sign/guides/quick-start-guides/developer/creating-and-sending-transaction

Here is my payload:

{
    "roles": [{
        "id": "Role1",
        "signers": [{
            "email": "[email protected]",
            "firstName": "Emmanuelle",
            "lastName": "Smith",
            "company": "Company Inc."
        }]
    }],
    "documents": [{
        "approvals": [{
            "role": "Role1",
            "fields": [{
                "page": "0",
                "top": "100",
                "subtype": "FULLNAME",
                "height": "50",
                "left": "100",
                "width": "200",
                "type": "SIGNATURE"
            }]
        }],
        "name": "Test Document"
    }],
    "name": "Test PBE 2021-02-15 12:01:02",
    "type": "PACKAGE",
    "language": "fr",
    "emailMessage": "Veuillez signer le contrat ci-joint dans les plus bref délais.",
    "description": "Test PBE 2021-02-15 12:01:02",
    "autoComplete": true,
    "status": "DRAFT"
}

As you can see, I made it almost identical than the one in the guide.

Thanks again,

Patrick B.


Attachments

Subscriptions

Topics Replies Freshness Views Users
4 3 years 1 month ago 117
Profile picture for user Duo_Liang

Hello,

I am trying to interface with OneSpan Sign using the REST API. I am using the LotusScript language on a HCL Notes / Domino platform.

7 3 years 2 months ago 321
Profile picture for user Duo_Liang
Can you please point me or give me example of json needs to be added to add signing date in a document (Using REST API)
13 3 years 1 month ago 659
Profile picture for user Duo_Liang
Profile picture for user tatternutz

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.