Application Packaging Standard

Last updated 18-Mar-2019

PrivacyPolicyManagement

Privacy Policy management

Schema

The considered APS type (download) extends the Resource APS type(s) and looks as follows:

{
  "name": "PrivacyPolicyManagement",
  "id": "http://www.odin.com/privacy-policy-management/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "access": {
    "global": true
  },
  "operations": {
    "getPrivacyPolicy": {
      "path": "privacy-policy",
      "verb": "GET",
      "response": {
        "type": "PrivacyPolicyInfo"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "accountId": {
          "kind": "query",
          "type": "integer"
        }
      }
    },
    "isPrivacyPolicyAccepted": {
      "path": "privacy-policy/acceptance",
      "verb": "GET",
      "response": {
        "type": "Result"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "ownerId": {
          "kind": "query",
          "type": "integer"
        },
        "login": {
          "kind": "query",
          "type": "string"
        }
      }
    },
    "acceptPrivacyPolicy": {
      "path": "privacy-policy/acceptance",
      "verb": "POST",
      "response": {
        "type": "Result"
      },
      "errorResponse": {
        "type": "object"
      }
    }
  },
  "structures": {
    "PrivacyPolicyInfo": {
      "type": "object",
      "properties": {
        "policyId": {
          "type": "integer"
        },
        "policyText": {
          "type": "string"
        }
      }
    },
    "Result": {
      "type": "object",
      "properties": {
        "status": {
          "type": "boolean",
          "required": true
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}

Custom Operations

OPERATION VERB PATH RETURNS Description
acceptPrivacyPolicy POST privacy-policy/acceptance Result containing status {@code true} in case if the acceptance is saved successfully Submit acceptance of a Privacy Policy instance by a user
getPrivacyPolicy GET privacy-policy PrivacyPolicyInfo information about the Privacy Policy. If the Privacy Policy acceptance is disabled for that account, an object with empty Privacy Policy text is returned. Return the information about the applicable Privacy Policy for an account necessary for the acceptance by a user
isPrivacyPolicyAccepted GET privacy-policy/acceptance Result containing status {@code true} if the user have already accepted the latest Privacy Policy applicable for the user owner’s account Check if the user have already accepted the corresponding Privacy Policy

acceptPrivacyPolicy

HTTP Request

POST /aps/2/resources/{aps-id}/privacy-policy/acceptance

Description

Submit acceptance of a Privacy Policy instance by a user

Parameters

PARAMETER TYPE DESCRIPTION
acceptanceParameters PrivacyPolicyAcceptanceParameters Contains information about the Privacy Policy instance being accepted and the accepting user

Returns

Result containing status {@code true} in case if the acceptance is saved successfully

getPrivacyPolicy

HTTP Request

GET /aps/2/resources/{aps-id}/privacy-policy

Description

Return the information about the applicable Privacy Policy for an account necessary for the acceptance by a user

Parameters

PARAMETER TYPE DESCRIPTION
accountId Integer Internal account ID

Returns

PrivacyPolicyInfo information about the Privacy Policy. If the Privacy Policy acceptance is disabled for that account, an object with empty Privacy Policy text is returned.

isPrivacyPolicyAccepted

HTTP Request

GET /aps/2/resources/{aps-id}/privacy-policy/acceptance

Description

Check if the user have already accepted the corresponding Privacy Policy

Parameters

PARAMETER TYPE DESCRIPTION
ownerId Integer User’s owner account internal ID
userLogin String User’s login

Returns

Result containing status {@code true} if the user have already accepted the latest Privacy Policy applicable for the user owner’s account

Structures

PrivacyPolicyAcceptanceParameters

Parameters for accepting a Privacy Policy by user

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
policyId Integer Not Required   Privacy Policy instance ID
userLogin String Not Required   Login of the user which accepts the Privacy Policy

PrivacyPolicyInfo

Privacy Policy info

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
policyId Integer Not Required   Privacy Policy instance ID
policyText String Not Required   Privacy Policy text

Result

Result for method can be forgotten

NAME TYPE ATTRIBUTES DEFAULT DESCRIPTION
message String Not Required   Optional message if account can not be forgotten
status Boolean Required   Can be forgotten

Examples

Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.