Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

In order to update a document template in ROFS, a developer can follow these instructions:

  1. Retrieve a download link to the current letter template to edit by using accessing the document API swagger page and using the GET /api/v1/document/downloadlink/{id} endpoint. You can get the current template GUID from the Rofs code base in DocumentTemplate.cs.

  2. Remove protection on document. In order to edit a document you must click navigate to Developer > Restrict Editing and then click Stop Protection

  3. Make any necessary edits to the document template.

  4. One you are done making edits, add protection back to the document with the setting in the screenshot. After clicking ‘Yes, Start Enforcing Protection’, leave the password field blank , and click OK

  5. Convert the updated word file to bytes by using the following tool:
    https://cloudmersive.com/convert-file-to-json-byte-array-tool
    This will be used to upload the document in JSON format

  6. Upload document to DMS by using the POST /api/v1/documents endpoint with the following request body, depending on your language. Replace the parameters in between {} with your request specific values.
    English:

    {
    "userName": "{YourEmail}",
    "fileBytes": "{FileBytesFromStep5}",
    "fileName": "NotificationLetter.docx",
    "fileContentType": "application/msword",
    "submissionMethod": "004",
    "fileLanguage": "english"
    }

    French:

    {
    "userName": "{YourEmail}",
    "fileBytes": "{FileBytesFromStep5}",
    "fileName": "LetterDeNotification.docx",
    "fileContentType": "application/msword",
    "submissionMethod": "004",
    "fileLanguage": "french"
    }

  7. Get the document id from the response generated in step 6 and update the DocID in Rofs DocumentTemplate.cs.

  8. Make sure to upload the updated template to the upper environments as well , by repeating steps 6-7.

  • No labels