Document

Only admins and super admins can create, update and delete documents.

Once a document category is created, you can create documents and assign them to the category.

Public and Private Documents

You can create public and private documents.

  • The public documents will be saved in a public bucket, so anyone can request them without being logged in.

  • The private documents in the other hand, can only be requested by users that are logged in, and they will be saved in a private bucket. These type of documents need an expiration time, which is the time in ms that the document link will be available.

PDF and URL

You can also create PDFs or URLs.

The PDFs will be saved in buckets (a public or a private one) and only the name to access to the object will be saved in the database, contrary to URLs that will be saved as it is sent in the content body.

A private PDF document accepts a body parameter called expirationTime which can be provided in ms. This is the time the pre-assigned URL generated by the bucket will be available. A pre-assigned URL is generated when the get /contents/documents endpoint is called.

Default Configuration For The App

By default, the app needs a settings category, with 3 documents:

  • Privacy Policy (name: privacyPolicy).

  • FAQ (name: faq).

  • Terms and Conditions (name: termsAndConditions).

These documents are all private and you can add them with the admin endpoints.

Last updated