Class BinderRequest

java.lang.Object
com.veeva.vault.vapil.api.request.VaultRequest<BinderRequest>
com.veeva.vault.vapil.api.request.BinderRequest

public class BinderRequest extends VaultRequest<BinderRequest>
Binder Requests
Vault API Coverage:
https://developer.veevavault.com/api/25.1/#binders

Covered in other classes for ease of use:
https://developer.veevavault.com/api/25.1/#binder-templates

  • Method Details

    • retrieveBinder

      public BinderResponse retrieveBinder(int binderId)
      Retrieve Binder

      Retrieve the first level of the binder (depth = false) or additional levels of the binder (depth = true)

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
       GET /api/{version}/objects/binders/{binder_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder
      Example Request:
       Example 1 - Setting Depth
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .setDepth(depthAll)
                              .retrieveBinder(binderId);
      Example Response:
       Binder binder = resp.getBinder();
      
       for (Node node : binder.getNodes()) {
         for (BinderSection binderSection : node.getProperties()) {
           System.out.println("Id = " + binderSection.getId());
           System.out.println("Document Id = " + binderSection.getDocumentId());
           System.out.println("Name = " + binderSection.getName());
           System.out.println("Order = " + binderSection.getOrder());
           System.out.println("ParentId = " + binderSection.getParentId());
           System.out.println("Section Number = " + binderSection.getSectionNumber());
           System.out.println("Type = " + binderSection.getType());
           System.out.println("Major Version = " + binderSection.getMajorVersionNumber());
           System.out.println("Minor Version = " + binderSection.getMinorVersionNumber());
         }
      
         if (node.hasChildren())
           this(node.getNodes());
       }
      
       Document doc = resp.getDocument();
       System.out.println("Name = " + doc.getName());
       System.out.println("Major Version = " + doc.getMajorVersionNumber());
       System.out.println("Minor Version = " + doc.getMinorVersionNumber());
       System.out.println("Status = " + doc.getStatus());
    • retrieveAllBinderVersions

      public BinderResponse retrieveAllBinderVersions(int binderId)
      Retrieve All Binder Versions

      Retrieve all versions of a binder

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
       GET /api/{version}/objects/binders/{binder_id}/versions
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-all-binder-versions
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .retrieveAllBinderVersions(binderId);
      Example Response:
       for (Version version : resp.getVersions()) {
         System.out.println("-----------------");
               System.out.println(version.getNumber());
               System.out.println(version.getValue());
       }
    • retrieveBinderVersion

      public BinderResponse retrieveBinderVersion(int binderId, int majorVersion, int minorVersion)
      Retrieve Binder Version

      Retrieve the fields and values configured on a specific version of a specific binder. Retrieve the first level of the binder (depth = false) or additional levels of the binder (depth = true)

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
       GET /api/{version}/objects/binders/{binder_id}/versions/(major_version}/{minor_version}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-version
      Example Request:
      BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .setDepth(depthAll)
                              .retrieveBinderVersion(binderId, majorVersion, minorVersion);   
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       Binder binder = resp.getBinder();
       
    • createBinder

      public BinderResponse createBinder(Document doc)
      Create Binder

      All required binder (document) fields must be included in the request. When creating a binder, no file is included in the request.

      Parameters:
      doc - Document fields for the binder
      Returns:
      BinderResponse
      Vault API Endpoint:
       POST /api/{version}/objects/binders
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#create-binder
      Example Request:
       Document doc = new Document();
      
       doc.setName("VAPIL Binder");
       doc.setLifecycle("General Lifecycle");
       doc.setType("General");
       doc.setTitle("Test Upload VAPIL Binder");
      
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .setAsync(true)
                              .createBinder(doc);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Status = " + resp.getResponseMessage());
       System.out.println("Status = " + resp.getDocument().getId());
    • createBinderFromTemplate

      public BinderResponse createBinderFromTemplate(Document doc, String templateName)
      Create Binder from Template

      Specify the API name of the template and document fields to create a binder from a template

      Parameters:
      doc - Document fields for the binder
      templateName - The API name of the binder template
      Returns:
      BinderResponse
      Vault API Endpoint:
       POST /api/{version}/objects/binders
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#create-binder-from-template
      Example Request:
       resp = vaultClient.newRequest(BinderRequest.class)
                              .createBinderFromTemplate(doc, "example_binder_template__c");
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Status = " + resp.getResponseMessage());
       System.out.println("Status = " + resp.getDocument().getId());
    • createBinderVersion

      public BinderResponse createBinderVersion(int binderId)
      Create Binder Version

      All required binder (document) fields must be included in the request. When creating a binder, no file is included in the request.

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
       POST /api/{version}/objects/binders/{binder_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#create-binder-version
      Example Request:
       resp = vaultClient.newRequest(BinderRequest.class)
       .createBinderVersion(resp.getDocument().getId());
      Example Response:
       System.out.println("\n****** Create Binder Version******");
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Status = " + resp.getResponseMessage());
       System.out.println("Status = " + resp.getDocument().getMajorVersionNumber());
       System.out.println("Status = " + resp.getDocument().getMinorVersionNumber());
    • updateBinder

      public BinderResponse updateBinder(int binderId, Document doc)
      Update Binder

      Update the binder (document) fields

      Parameters:
      binderId - The id of the binder (document)
      doc - Document fields for the binder
      Returns:
      BinderResponse
      Vault API Endpoint:
       PUT /api/{version}/objects/binders/{binder_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder
      Example Request:
       resp = vaultClient.newRequest(BinderRequest.class)
                                      .updateBinder(binderId, doc);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • reclassifyBinder

      public BinderResponse reclassifyBinder(int binderId, Document doc)
      Reclassify Binder

      Reclassify allows you to change the document type of an existing binder. A document "type" is the combination of the type__v, subtype__v, and classification__v fields on a binder. When you reclassify, Vault may add or remove certain fields on the binder. You can only reclassify the latest version of a binder and only one binder at a time. The API does not currently support Bulk Reclassify. You can also add or remove values for any other editable field.

      Parameters:
      binderId - The id of the binder (document)
      doc - Document fields for the binder with needed doc type fields set (type__v, subtype__v, classification__v, and lifecycle__v). Additional doc fields can be specified.
      Returns:
      BinderResponse
      Vault API Endpoint:
       PUT /api/{version}/objects/binders/{binder_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder
      Example Request:
       doc.setType("Artwork");
       doc.setLifecycle("Artwork LC");
       doc.setName("Reclassified binder");
      
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
       .reclassifyBinder(binderId, doc);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       
    • refreshBinderAutoFiling

      public BinderResponse refreshBinderAutoFiling(int binderId)
      Refresh Binder Auto-Filing

      This is only available in eTMF vaults on binders configured with the TMF Reference Models.

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/actions
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#refresh-binder-auto-filing
    • updateBinderVersion

      public BinderResponse updateBinderVersion(int binderId, int majorVersion, int minorVersion, Document doc)
      Update Binder Version

      Update the binder (document) fields on a specific version

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      doc - Document fields for the binder
      Returns:
      BinderResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder-version
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .updateBinderVersion(binderId, majorVersion, minorVersion, doc);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • deleteBinder

      public BinderResponse deleteBinder(int binderId)
      Delete Binder
      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
      DELETE /api/{version}/objects/binders/{binder_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#delete-binder
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .deleteBinder(binderId);
      Example Response:
       System.out.println("\n****** Delete Binder ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       
    • deleteBinderVersion

      public BinderResponse deleteBinderVersion(int binderId, int majorVersion, int minorVersion)
      Delete Binder Version
      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
      DELETE /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#delete-binder-version
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .deleteBinderVersion(binderId, majorVersion, minorVersion);
      Example Response:
       System.out.println("\n****** Delete Binder Version ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       
    • retrieveBinderSections

      public BinderResponse retrieveBinderSections(int binderId)
      Retrieve Binder Sections (top-level root node)

      Retrieve all sections (documents and subsections) in a binder's top-level root node

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      BinderResponse
      Vault API Endpoint:
      GET /api/{version}/objects/binders/{binder_id}/sections
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-sections
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .retrieveBinderSections(binderId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
      
       printBinder(resp.getBinder().getNodes());
      
       System.out.println("\n****** Retrieve Binder Section - Specific Node ******\n");
       // Note the different response model to handle differences with specific node response format
       BinderSectionResponse resp2 = vaultClient.newRequest(BinderRequest.class)
       .retrieveBinderSections(binderId, sectionId);
      
       System.out.println("Status = " + resp2.getResponseStatus());
       List<BinderSection> binderSections = resp2.getNode().getProperties();
       for (BinderSection binderSection : binderSections)
       printBinderSection(binderSection);
      
       printBinder(resp2.getNode().getNodes());
       
    • retrieveBinderSections

      public BinderSectionResponse retrieveBinderSections(int binderId, String sectionId)
      Retrieve Binder Sections (sub-level node)

      Retrieve all sections (documents and subsections) in a binder's sub-level node.

      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section id (also referred to as "node_id" in the API documentation)
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      GET /api/{version}/objects/binders/{binder_id}/sections/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-sections
    • retrieveBinderVersionSections

      public BinderSectionResponse retrieveBinderVersionSections(int binderId, int majorVersion, int minorVersion, String sectionId)
      Retrieve Binder Version Sections (sub-level node)

      Retrieve all sections (documents and subsections) in a binder's sub-level node (for the specified binder version)

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      sectionId - The section id (also referred to as "node_id" in the API documentation)
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
       GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/sections/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-version-section
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .retrieveBinderVersionSections(binderId, majorVersion, minorVersion, sectionId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       List<BinderSection> binderSections = resp.getNode().getProperties();
       for (BinderSection binderSection : binderSections)
       printBinderSection(binderSection);
      
       printBinder(resp.getNode().getNodes());
       
    • createBinderSection

      public BinderSectionResponse createBinderSection(int binderId, Binder.Node.BinderSection binderSection)
      Create Binder Section

      Create a binder section with the passed in section properties, including set values for name__v (required), section_number__v, parent_id__v, order__v

      Parameters:
      binderId - The id of the binder (document)
      binderSection - Properties of the BinderSection, with name__v as the only required field
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/sections
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#create-binder-section
      Example Request:
       Example 1
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .createBinderSection(binderId, binderSection);
      ,
       Example 2 - Sub Section         *
       binderSection = new BinderSection();
       binderSection.setName(name + " Child");
       binderSection.setParentId(resp.getId());
      
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .createBinderSection(binderId, binderSection);
      Example Response:
       Example 1
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Created Id = " + resp.getId());
      ,
       Example 2 - Sub Section
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Created Id = " + resp.getId());
    • updateBinderSection

      public BinderSectionResponse updateBinderSection(int binderId, String sectionId, Binder.Node.BinderSection binderSection)
      Update Binder Section

      Update a binder section with the passed in section properties, including set values for name__v, section_number__v, parent_id__v, order__v

      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section id (also referred to as "node_id" in the API documentation
      binderSection - Properties of the BinderSection, with name__v as the only required field
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/sections/{node_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder-section
      Example Request:
       binderSection.setName("Changed Name");
      
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                      .updateBinderSection(binderId, resp.getId(), binderSection);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • deleteBinderSection

      public BinderSectionResponse deleteBinderSection(int binderId, String sectionId)
      Delete Binder Section
      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section id (also referred to as "node_id" in the API documentation
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      DELETE /api/{version}/objects/binders/{binder_id}/sections/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#delete-binder-section
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
       .deleteBinderSection(binderId, resp.getId());
      Example Response:
      temp
    • addDocumentToBinder

      public BinderSectionResponse addDocumentToBinder(int binderId, int docId)
      Add Document to Binder

      Set binding rule to specific when adding document to the binder, specifying the major/minor version

      Parameters:
      binderId - The id of the binder (document)
      docId - The id of the document being added to the binder
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/documents
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#add-document-to-bindern
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class).addDocumentToBinder(binderId, docId, parentId, majorVersion, minorVersion);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • moveDocumentInBinder

      public BinderSectionResponse moveDocumentInBinder(int binderId, String sectionId, String parentId)
      Move Document in Binder
      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section (node) id to be removed
      parentId - Value of the new parent node to move the document to a different section or from a section to the binder's root node
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/documents/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#move-document-to-bindern
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .moveDocumentInBinder(binderId, sectionId, parentId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • moveDocumentInBinder

      public BinderSectionResponse moveDocumentInBinder(int binderId, String sectionId, String parentId, int order)
      Move Document in Binder

      Move document and also set a new order

      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section (node) id to be removed
      parentId - Value of the new parent node to move the document to a different section or from a section to the binder's root node
      order - Enter a number reflecting the new position of the document within the binder or section
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/documents/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#move-document-to-bindern
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .moveDocumentInBinder(binderId, sectionId, parentId, order);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • removeDocumentFromBinder

      public BinderSectionResponse removeDocumentFromBinder(int binderId, String sectionId)
      Remove Document from Binder
      Parameters:
      binderId - The id of the binder (document)
      sectionId - The section (node) id to be removed
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      DELETE /api/{version}/objects/binders/{binder_id}/documents/{section_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#remove-document-from-bindern
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .removeDocumentFromBinder(binderId, sectionId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
    • retrieveBinderRelationship

      public DocumentRelationshipRetrieveResponse retrieveBinderRelationship(int binderId, int majorVersion, int minorVersion)
      Retrieve Binder Relationship (All Binder Relationships)

      Retrieve all relationships for a binder

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      Returns:
      DocumentRelationshipRetrieveResponse
      Vault API Endpoint:
      GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-relationship
      Example Request:
       DocumentRelationshipRetrieveResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .retrieveBinderRelationship(binderId, majorVersion, minorVersion);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       for (Relationship respRel : resp.getRelationships()) {
         DocumentRelationship rel = respRel.getRelationship();
      
         System.out.println("");
         relationshipId = rel.getId();
         System.out.println("Relationship Id = " + relationshipId);
         System.out.println("Type = " + rel.getRelationshipType());
         System.out.println("Created By = " + rel.getCreatedBy());
         System.out.println("Created Date = " + rel.getCreatedDate());
         System.out.println("Source Doc Id = " + rel.getSourceDocId());
         System.out.println("Target Doc Id = " + rel.getTargetDocId());
         System.out.println("Major = " + rel.getTargetMajorVersion());
         System.out.println("Minor = " + rel.getTargetMinorVersion());
       }
    • retrieveBinderRelationship

      public DocumentRelationshipRetrieveResponse retrieveBinderRelationship(int binderId, int majorVersion, int minorVersion, int relationshipId)
      Retrieve Binder Relationship (Single Binder Relationship)

      Retrieve a specific/single binder relationship, as specified by relationship id

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      relationshipId - The binder relationship id field value.
      Returns:
      DocumentRelationshipRetrieveResponse
      Vault API Endpoint:
      GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships/{relationship_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-relationship
      Example Request:
       System.out.println("\n****** Retrieve Binder Relationships (Single) ******\n");
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .retrieveBinderRelationship(binderId, majorVersion, minorVersion, relationshipId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       for (Relationship respRel : resp.getRelationships()) {
         DocumentRelationship rel = respRel.getRelationship();
      
         System.out.println("");
         relationshipId = rel.getId();
         System.out.println("Relationship Id = " + relationshipId);
         System.out.println("Type = " + rel.getRelationshipType());
         System.out.println("Created By = " + rel.getCreatedBy());
         System.out.println("Created Date = " + rel.getCreatedDate());
         System.out.println("Source Doc Id = " + rel.getSourceDocId());
         System.out.println("Target Doc Id = " + rel.getTargetDocId());
         System.out.println("Major = " + rel.getTargetMajorVersion());
         System.out.println("Minor = " + rel.getTargetMinorVersion());
       }
    • createBinderRelationship

      public DocumentRelationshipResponse createBinderRelationship(int binderId, int majorVersion, int minorVersion, DocumentRelationship binderRelationship)
      Create Binder Relationship
      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      binderRelationship - Object with properties for creating the relationship, including:
      • targetDocId (target_doc_id__v) - Set the target_doc_id__v to the document id of the "target document" to which a relationship will be established with the binder
      • relationshipType (relationship_type__v) - Set the relationship_type__v to the field value of one of the desired relationshipTypes from the �Documents Relationships Metadata� call
      • targetMajorVersion (target_major_version__v) - Required if creating a relationship with a specific version of the target document
      • targetMinorVersion (target_minor_version__v) - Required if creating a relationship with a specific version of the target document
      Returns:
      DocumentRelationshipResponse, with the getId method returning the resulting id from the created relationship
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#create-binder-relationship
      Example Request:
       System.out.println("\n****** Create Binder Relationships ******\n");
       DocumentRelationship binderRelationship = new DocumentRelationship();
       binderRelationship.setRelationshipType("supporting_documents__c");
       binderRelationship.setTargetDocId(targetDocId);
      
       DocumentRelationshipResponse resp = vaultClient.newRequest(BinderRequest.class)
                              .createBinderRelationship(binderId, majorVersion, minorVersion, binderRelationship);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Message = " + resp.getResponseMessage());
       System.out.println("Id " + resp.getId());
       
    • deleteBinderRelationship

      public DocumentRelationshipResponse deleteBinderRelationship(int binderId, int majorVersion, int minorVersion, int relationshipId)
      Delete Binder Relationship
      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      relationshipId - The binder relationship id field value.
      Returns:
      DocumentRelationshipResponse
      Vault API Endpoint:
      DELETE /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships/{relationship_id}
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#delete-binder-relationship
      Example Request:
       DocumentRelationshipResponse resp = vaultClient.newRequest(BinderRequest.class)
                                              .deleteBinderRelationship(binderId, majorVersion, minorVersion, relationshipId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Message = " + resp.getResponseMessage());
    • exportBinder

      public JobCreateResponse exportBinder(int binderId)
      Export Binder

      Export the latest version of the complete binder, including all binder sections and documents. After initiating an export, you can retrieve its status, results, and download the exported binder.

      Parameters:
      binderId - The id of the binder (document)
      Returns:
      JobCreateResponse Contains the Job Id to monitor status and results
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/actions/export
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#export-binder
      Example Request:
       JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .exportBinder(binderId);
      Example Response:
       System.out.println("Status = " + resp.getResponseStatus());
       jobId = resp.getJobId();
       System.out.println("Job Id = " + jobId);
    • exportBinder

      public JobCreateResponse exportBinder(int binderId, int majorVersion, int minorVersion)
      Export Binder

      Export a specific version of the complete binder, including all binder sections and documents. After initiating an export, you can retrieve its status, results, and download the exported binder.

      Parameters:
      binderId - The id of the binder (document)
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      Returns:
      JobCreateResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/actions/export
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#export-binder
      Example Request:
       JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .exportBinder(binderId, majorVersion, minorVersion);
      Example Response:
       System.out.println("\n****** Export Binder (Version) ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       jobId = resp.getJobId();
       System.out.println("Job Id = " + jobId);
    • exportBinderSections

      public JobCreateResponse exportBinderSections(int binderId, Set<String> sectionIds)
      Export Binder Sections

      Export specific binder sections for the latest version of the binder. Exporting a binder section node will automatically include all of its subsections and documents therein. Vault will ignore id values which are invalid, but will export all which are valid.

      Parameters:
      binderId - The binder id to export
      sectionIds - Set of ids to export, either the section or document node
      Returns:
      JobCreateResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/actions/export
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#export-binder-sections
      Example Request:
       JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .exportBinderSections(binderId, sectionIds);
      Example Response:
       System.out.println("\n****** Export Binder Section ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       jobId = resp.getJobId();
       System.out.println("Job Id = " + jobId);
    • exportBinderSections

      public JobCreateResponse exportBinderSections(int binderId, int majorVersion, int minorVersion, Set<String> sectionIds)
      Export Binder Sections

      Export specific binder sections for a specific version of the binder.

      Exporting a binder section node will automatically include all of its subsections and documents therein. Vault will ignore id values which are invalid, but will export all which are valid.

      Parameters:
      binderId - The binder id to export
      majorVersion - The major version of the binder (document)
      minorVersion - The minor version of the binder (document)
      sectionIds - Set of ids to export, either the section or document node
      Returns:
      JobCreateResponse
      Vault API Endpoint:
      POST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/actions/export
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#export-binder-sections
      Example Request:
       JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .exportBinderSections(binderId, majorVersion, minorVersion, sectionIds);
      Example Response:
       System.out.println("\n****** Export Binder Section (Version) ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       jobId = resp.getJobId();
       System.out.println("Job Id = " + jobId);
    • retrieveBinderExportResults

      public BinderExportResponse retrieveBinderExportResults(int jobId)
      Retrieve Binder Export Results

      After submitting a request to export a binder from your vault, you can query vault to determine the results of the request.

      Parameters:
      jobId - The id value of the requested export job
      Returns:
      BinderExportResponse
      Vault API Endpoint:
      GET /api/{version}/objects/binders/actions/export/{job_id}/results
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#retrieve-binder-export-results
      Example Request:
       BinderExportResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .retrieveBinderExportResults(jobId);
      Example Response:
       System.out.println("\n****** Retrieve Binder Export Results ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
       System.out.println("Id = " + resp.getId());
       System.out.println("File = " + resp.getFile());
       System.out.println("Major Version = " + resp.getMajorVersionNumber());
       System.out.println("Minor Version = " + resp.getMinorVersionNumber());
       System.out.println("User Id = " + resp.getUserId());
       
    • updateBindingRule

      public BinderResponse updateBindingRule(int binderId, String bindingRule, Boolean bindingRuleOverride)
      Update Binding Rule
      Parameters:
      binderId - The binder id
      bindingRule - Indicates which binding rule to apply (which document versions to link to the section). Options are:
      • default (bind to the latest available version)
      • steady-state (bind to latest version in a steady-state)
      • current (bind to current version)
      bindingRuleOverride - Set to true or false to indicate if the specified binding rule should override documents or sections which already have binding rules set. If set to true, the binding rule is applied to all documents and sections within the current section. If false, the binding rule is applied only to documents and sections within the current section that do not have a binding rule specified
      Returns:
      BinderResponse The resulting response contains status and the binder id
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/binding_rule
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binding-rules
      Example Request:
       BinderResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .updateBindingRule(binderId, bindingRule, bindingRuleOverride);
      Example Response:
       System.out.println("\n****** Update Binding Rule Results ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
    • updateBinderSectionBindingRule

      public BinderSectionResponse updateBinderSectionBindingRule(int binderId, String sectionId, String bindingRule, Boolean bindingRuleOverride)
      Update Binder Section Binding Rule

      The resulting response contains status and the binder section id

      Parameters:
      binderId - The binder id
      sectionId - The section id (also referred to as "node_id" in the API documentation)
      bindingRule - Indicates which binding rule to apply (which document versions to link to the section). Options are:
      • default (bind to the latest available version)
      • steady-state (bind to latest version in a steady-state)
      • current (bind to current version)
      bindingRuleOverride - Set to true or false to indicate if the specified binding rule should override documents or sections which already have binding rules set. If set to true, the binding rule is applied to all documents and sections within the current section. If false, the binding rule is applied only to documents and sections within the current section that do not have a binding rule specified
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/sections/{node_id}/binding_rule
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder-section-binding-rule
      Example Request:
       BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class)
                                      .updateBinderSectionBindingRule(binderId, sectionId, bindingRule, bindingRuleOverride);
      Example Response:
       System.out.println("\n****** Update Binding Rule Results ******\n");
       System.out.println("Status = " + resp.getResponseStatus());
    • updateBinderDocumentBindingRule

      public BinderSectionResponse updateBinderDocumentBindingRule(int binderId, String sectionId, String bindingRule)
      Update Binder Document Binding Rule
      Parameters:
      binderId - The binder id
      sectionId - The section id (also referred to as "node_id" in the API documentation)
      bindingRule - Indicates which binding rule to apply (which document versions to link to the section). Options are:
      • default (bind to the latest available version)
      • steady-state (bind to latest version in a steady-state)
      • current (bind to current version)
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/documents/{node_id}/binding_rule
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder-document-binding-rule
    • updateBinderDocumentBindingRule

      public BinderSectionResponse updateBinderDocumentBindingRule(int binderId, String sectionId, String bindingRule, int majorVersion, int minorVersion)
      Update Binder Document Binding Rule
      Parameters:
      binderId - The binder id
      sectionId - The section id (also referred to as "node_id" in the API documentation)
      bindingRule - Indicates which binding rule to apply (which document versions to link to the section). Options are:
      • default (bind to the latest available version)
      • steady-state (bind to latest version in a steady-state)
      • current (bind to current version)
      majorVersion - If the binding_rule is specific, then this is required and indicates the major version of the document to be linked
      minorVersion - If the binding_rule is specific, then this is required and indicates the minor version of the document to be linked
      Returns:
      BinderSectionResponse
      Vault API Endpoint:
      PUT /api/{version}/objects/binders/{binder_id}/documents/{node_id}/binding_rule
      Vault API Help Link:
      https://developer.veevavault.com/api/25.1/#update-binder-document-binding-rule
    • setDepth

      public BinderRequest setDepth(Boolean depth)
      Binder retrieves - specify whether to retrieve all binder nodes when getting a binder
      Parameters:
      depth - Set to true to retrieve all binder nodes
      Returns:
      The request
    • setAsync

      public BinderRequest setAsync(Boolean async)
      Binder creates - specify async. When creating a binder, the binder metadata is indexed synchronously by default. To process the indexing asynchronously, include a query parameter async set to true (objects/binders?async=true). This helps speed up the response time from Vault when processing large amounts of data.
      Parameters:
      async - Set to true to process async
      Returns:
      The request
    • setExportAttachmentType

      public BinderRequest setExportAttachmentType(BinderRequest.AttachmentType exportAttachmentType)
      Export Binder with Attachments Include latest or all attachments
      Parameters:
      exportAttachmentType - all or latest
      Returns:
      The request
    • setExportAudit

      public BinderRequest setExportAudit(Boolean exportAudit)
      Export Binder with Audit Trails Include document audit trails
      Parameters:
      exportAudit - true/false
      Returns:
      The request
    • setExportAuditFormatType

      public BinderRequest setExportAuditFormatType(BinderRequest.AuditFormatType exportAuditFormatType)
      Export Binder with Audit Trail Format Audit Trail format can be CSV, PDF, or TEXT
      Parameters:
      exportAuditFormatType - csv, pdf or text
      Returns:
      The request
    • setExportDocumentMetadata

      public BinderRequest setExportDocumentMetadata(Boolean exportDocumentMetadata)
      Export Binder with Document Metadata Include document fields
      Parameters:
      exportDocumentMetadata - true/false
      Returns:
      The request
    • setExportDocumentVersionType

      public BinderRequest setExportDocumentVersionType(BinderRequest.DocumentVersionType exportDocumentVersionType)
      Export Binder Document Versions Include major or major/minor versions
      Parameters:
      exportDocumentVersionType - major or major_minor
      Returns:
      The request
    • setExportSource

      public BinderRequest setExportSource(String exportRenditionType)
      Export Binder with Rendition Types Include a specific rendition type
      Parameters:
      exportRenditionType - rendition api name (viewable_rendition__v_
      Returns:
      The request
    • setExportSource

      public BinderRequest setExportSource(Boolean exportSource)
      Export Binder with Document Source Content Include document content
      Parameters:
      exportSource - true/false
      Returns:
      The request
    • setParentId

      public BinderRequest setParentId(String parentId)
      Add Document to Binder with Section ID of Parent Section
      Parameters:
      parentId - The parent section id
      Returns:
      The request
    • setOrder

      public BinderRequest setOrder(int order)
      Add Document to Binder number reflecting the position of the document within the binder or section
      Parameters:
      order - The order within the binder
      Returns:
      The request
    • setMajorVersion

      public BinderRequest setMajorVersion(int majorVersionNumber)
      Add Document to Binder with Major Version when binding_rule = specific
      Parameters:
      majorVersionNumber - The major version number
      Returns:
      The request
    • setMinorVersion

      public BinderRequest setMinorVersion(int minorVersionNumber)
      Add Document to Binder with Minor Version when binding_rule = specific
      Parameters:
      minorVersionNumber - The minor version number
      Returns:
      The request
    • setBindingRule

      public BinderRequest setBindingRule(BinderRequest.BindingRule bindingRule)
      Add Document to Binder with binding rule
      Parameters:
      bindingRule - The binding rule.
      Returns:
      The request