Example: Adding a Portal Signup Legal Agreement

This example gives you the basic steps for adding a new portal signup legal agreement in the  Akana API Platform by using the API rather than the user interface.

This exercise assumes that you already have a valid login for the  Akana API Platform and are a Site Admin.

Before starting, you will need:

  • A valid UserID and password for portal access.
  • The legal agreement itself.

For more information about legal agreements, refer to Managing Legal Agreements on the Portal.

Essentially, you'll need to complete these activities, in sequence:

  1. First, make sure there isn't already a portal signup legal agreement. The API platform allows only one signup agreement. If there is one already existing, you'll have to deactivate it first. For instruction on how to do that in the developer portal, refer to the developer portal Site Admin help. To deactivate/update using the API, use the PUT /api/legals/{LegalDocumentID} operation.
  2. Log in using the authorized user profile you've already set up. Operation: POST /api/login.
  3. Upload the portal legal agreement using the Content API. Operation: POST /content/{path} (with multipart/form-data content-type).
  4. Define the new agreement as the portal's signup legal agreement. Operation: POST /api/legals.
  5. When done, remember to log out using the POST /api/login/logout operation.

Back to top

Related Topics