Skip to main content
Veeva Support US Holiday: Jul 4th - Limited staff, please plan accordingly

Community

Search

Welcome to Community

Question when uploading unclassified document by RestAPI in Veeva Vault

Answered

Comments

3 comments

  • Official comment
    Isak Thomas

    Hi Louis,

    When creating an Unclassified document, the file, type__v, and lifecycle__v body parameters are only allowed:

    There is a subsection in our documentation specifically about creating Unclassified documents through the API:
    https://developer.veevavault.com/api/22.1/#create-single-document

    I would also recommend using our Postman collection to test as well. This is updated every release to include new platform API features:
    https://developer.veevavault.com/api/22.1/#run-in-postman

  • Louis Zhou

    Hi Isak,

     

    Thank you for your recommendation. I will refer to suggested API to upload document, i.e., https://developer.veevavault.com/api/22.1/#create-single-document.

     

    I can use Postman to test the API. However, I am now planning to build the coding program in Java to integrate this API into our internal system. Before the integration, I want to confirm the request body on multipart/form-data format in java for our REST API. Could you please provide a help on this?

     

    Please kindly refer to below and let me know if any correction is required. Thank you so much!

     

    --SAPPO243fad9dc9db11ec85b50000003990ea

    Content-Disposition: form-data;name="name__v";

     

    myDocument

     

    --SAPPO243fad9dc9db11ec85b50000003990ea

    Content-Disposition: form-data;name="type__v";

     

    Unclassified

     

    --SAPPO243fad9dc9db11ec85b50000003990ea

    Content-Disposition: form-data;name="lifecycle__v";

     

    Inbox

     

    --SAPPO243fad9dc9db11ec85b50000003990ea

    Content-Disposition: form-data;name="file";filename="test.txt";

    Content-Type: text/plain

     

    666666,7,8,9

    test1,1,2,3

    test2,4,5,6

     

    --SAPPO243fad9dc9db11ec85b50000003990ea--

    0
  • Isak Thomas

    Hi Louis,

    First, I would strongly recommend using Vapil to help you build Vault API calls in Java. Here is the more information about that:
    https://developer.veevavault.com/docs/#vault-api-library

    As far as your API call, it looks fine to me from what I can tell. The main benefit of using the Postman collection is that you can test your parameters for your API call and then code it appropriately. 

    0

Please sign in to leave a comment.

Powered by Zendesk