This topic contains 2 replies, has 2 voices, and was last updated by  saraizad 2 months, 2 weeks ago.

  • Author
    Posts
  • Participant
    saraizad
    Newbie
    Member since: 20.12.2018
    Number of posts: 13

    Hi,

    Is there a REST API that I can call and retrieve information about the position of the signature field(s) and metadata of a document? I would like to send a document Id/or package Id and get all the details of it. Like the same JSON that we would have sent to create the document if we were using the create document REST API.

    we have a use case that we need to design the document in the oneSpan session and then keep the file and its related metadata in-house, then sending the file again back to OneSpan to collect signatures at a later time with the metadata, so we can package the files differently.

    Thanks!

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 688
    Approved answer

    Score

    1

    Hi saraizad,

    About your question “API call to retrieve document/package metadata”. Yes, there’re two APIs for retrieving package and document JSON:

    1. Retrieve Package JSON

    HTTP Request
    GET /api/packages/{packageId}
    
    HTTP Headers
    Accept: application/json; esl-api-version=11.21
    Authorization: Basic api_key

    2.Retrieve Specific Document JSON

    HTTP Request
    GET /api/packages/{packageId}/documents/{documentId}
    
    HTTP Headers
    Accept: application/json; esl-api-version=11.21
    Authorization: Basic api_key

    Note, you need to carry “esl-api-version” in your request header in order to show the extended form fields like radio/list fields. It’s recorded in Release Note 10.6.1.

    And per your description, it sounds like the “Layout” Feature, guide here. Which allows you to save the metadata of one document at OneSpan Sign side and to apply on successive documents in further.

    Hope this could help!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    saraizad
    Newbie
    Member since: 20.12.2018
    Number of posts: 13

    Score

    0

    Thank you! I think the is the esl-api-version is the key! I tried it and it worked!

    • This reply was modified 2 months, 2 weeks ago by  saraizad.

You must be logged in to reply to this topic.