openapi: 3.1.0
info:
  title: Privacy Policy Management V3 APIs
  description: >-
    General Data Protection Regulation (GDPR) and the California Consumer
    Privacy Act (CCPA) define that consumer/data subjects have the right to
    view, update, extract, and delete the data that controllers and business
    have saved on them. When the consumer/data subject exercises their rights
    they create a data request.

    These APIs are used to delete the members from one or multiple sites by
    using the DELETE request method and if the user wants to revoke his account,
    then it can be done with the help of the PUT request method.
  version: 3.0.1
servers:
  - url: https://s15.socialannex.net/api/3.0
paths:
  /tenant/privacy/gettoken:
    get:
      tags:
        - User Delete
      summary: Generate an authorization token
      description: >-
        In order to make a successful delete request using the privacy api, you
        must start by generating an authorization token that you will use to
        make the request.
      operationId: tenantprivacygettoken
      parameters:
        - name: siteId
          in: path
          description: Enter the Annex Cloud site ID for the loyalty program.
          example: 146031180
          required: true
          schema:
            type: string
        - name: userId
          in: path
          description: Enter the unique user ID for the loyalty member.
          example: joshuasmith@gmail.com
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tenantprivacygettokenresp'
            application/xml:
              schema:
                $ref: '#/components/schemas/tenantprivacygettokenresp'
        '400':
          description: AC1004 Bad Request
        '404':
          description: AC1005 No data found
        '405':
          description: AC1002 Request Not Authorized
  /deleteuser:
    delete:
      tags:
        - User Delete
      summary: Delete member from one or multiple sites
      description: >-
        This method is used to request the deletion of members. When a user
        submits a member deletion request, the API endpoint designated for
        handling such requests uses the DELETE method to remove the member from
        the system. This ensures that the members are permanently deleted from
        the database. This API will receive and store the requests in the queue
        periodically. The delete request runs every 12 hours at 05:30 AM UTC and
        05:30 PM UTC. Member by member in the queue will be picked and deleted
        from every table in the database.
      operationId: deleteUser
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                siteId:
                  description: >-
                    Enter the site identification number, If you want to fetch
                    multiple site IDs then enter the site IDs seperated by a
                    comma.
                  example:
                    - 9991331
                    - 21321321
                  type: array
                userId:
                  description: >-
                    Enter the member’s unique ID.(it can be email address or any
                    primary data set by the client)
                  example: abc123
                  type: string
              required:
                - siteId
                - userId
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deleteuser'
            application/xml:
              schema:
                $ref: '#/components/schemas/deleteuser'
        '201':
          description: successful operation
        '400':
          description: AC1004 Missing Parameters | AC1012 User not found
        '404':
          description: AC1005 No data found
        '405':
          description: AC1002 Request Not Authorized
  /getuserdetails:
    put:
      tags:
        - User Group Details
      summary: User Group Details
      description: >-
        The Get Token process is a critical first step for initiating
        privacy-related requests, such as delete operations, within the Privacy
        API. This endpoint generates an authorization token to ensure secure and
        authorized access, which must be included in all subsequent API
        requests. User group details are validated twice daily—at 12:00 AM and
        12:00 PM UTC. The data is processed group by group, and group details
        from either a single site or multiple sites are delivered via email in a
        JSON response format.
      operationId: UserGroupDetails
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                siteId:
                  description: >-
                    Enter the site identification number, If you want to fetch
                    multiple siteIDs then enter the site IDs separated by a
                    comma.
                  example:
                    - 9991331
                    - 21321321
                  type: array
                userId:
                  description: >-
                    Enter the member’s unique id.(it can be email or any primary
                    data set by the client)
                  example: abc123
                  type: string
                clientEmail:
                  description: Enter the email ID of the client you want to fetch.
                  example: user@gmail.com
                  type: string
              required:
                - siteId
                - userId
                - clientEmail
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/putgetuserdetailsresp'
            application/xml:
              schema:
                $ref: '#/components/schemas/putgetuserdetailsresp'
        '201':
          description: successful operation
        '400':
          description: AC1004 Missing Parameters | AC1012 User not found
        '404':
          description: AC1005 No data found
        '405':
          description: AC1002 Request Not Authorized
  /revokeuser:
    put:
      tags:
        - User Delete
      summary: Revoke Delete Request
      description: >-
        When a user requests to delete a member, the request will be in a queue,
        and within 12 hours the request will be deleted his personal
        information. If the user wants to revoke his request within 12 hours
        then it can be cancelled. But beyond 12 hours if the user wants to
        revoke his requisition, then the request cannot be cancelled. In this
        API if the user makes the revoke request before getting deleted, then
        his request to delete the member is removed from the queue.
      operationId: RevokeUser
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                siteId:
                  description: >-
                    Enter the site identification number, If you want to fetch
                    multiple siteIDs then enter the site IDs seperated by a
                    comma.
                  example:
                    - 9991331
                    - 21321321
                  type: array
                userId:
                  description: >-
                    Enter the member’s unique id.(it can be email or any primary
                    data set by the client)
                  example: abc123
                  type: string
              required:
                - siteId
                - userId
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/putrevokeuserresp'
            application/xml:
              schema:
                $ref: '#/components/schemas/putrevokeuserresp'
        '201':
          description: successful operation
        '400':
          description: AC1004 Missing Parameters | AC1012 User not found
        '404':
          description: AC1005 No data found
        '405':
          description: AC1002 Request Not Authorized
components:
  schemas:
    putrevokeuserresp:
      type: object
      properties:
        data:
          type: object
          properties:
            siteId:
              type: array
              description: Displays the site ID for which the profile has been created.
              example:
                - 9991331
                - 21321321
            userId:
              type: string
              description: Displays the unique member ID.
              example: abc123
            description:
              type: string
              description: >-
                Displays the description as “Congratulations, your delete
                request has been removed.”
              example: Congratulations, your delete request has been removed.
    putgetuserdetailsresp:
      type: object
      properties:
        data:
          type: object
          properties:
            siteId:
              type: array
              description: Displays the site ID from where the request has arrived.
              example:
                - 9991331
                - 21321321
            userId:
              type: string
              description: Displays the unique member ID.
              example: Kamal@gmail.com
            clientEmail:
              type: string
              description: Enter the email address of the client you want to fetch.
              example: user@gmail.com
            description:
              type: string
              description: >-
                Displays the description message as “We have received your
                request, we will process it within 24 hours and delete the user
                from 146031180,146032020,146033220,146034180.”
              example: >-
                We have received your request, we will process it within 24
                hours and delete the user from
                146031180,146032020,146033220,146034180.
    tenantprivacygettokenresp:
      type: object
      properties:
        data:
          type: object
          description: Displays details for the following parameters
          properties:
            bearerToken:
              type: string
              description: >-
                Displays the generated authorization token. Copy this token and
                paste it in the Authorization parameter of the headers section
                in the request.
              example: >-
                eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRob3JpemF0aW9uVG9rZW4iLCJleHAiOjE3MDkwMjM1NjgsInNpdGVfaWQiOiI5OTkxMzMxIiwiaG1hYyI6IndUbGFjVXphNTdZRFZ2b3pudmxYTXdid25HWmE1djJkQ1wvVVdrWnJIMklFPSJ9.fiUzfxjFm3InZ2xE4yn_SMlVPXv4aRTyLhkoiWLTPm0
    deleteuser:
      type: object
      properties:
        data:
          type: object
          properties:
            siteId:
              type: array
              description: Displays the site_Id from where the request has been arrived.
              example:
                - 9991331
                - 21321321
            userId:
              type: string
              description: Displays the unique member ID.
              example: test@gmail.com
            description:
              type: string
              description: >-
                Displays the description message as “We have received your
                request, we will process it within 24 hours and delete the user
                from 146031180,146032020,146033220,146034180.”
              example: >-
                We have received your request, we will process it within 24
                hours and delete the user from
                146031180,146032020,146033220,146034180.
tags:
  - name: User Delete
    description: >-
      The DELETE request method is used to remove a user from one or more sites.
      If the user wishes to revoke their account entirely, this can be done
      using the PUT request method.
  - name: User Group Details
    description: >-
      The User Group Details section allows you to fetch and view user
      information across multiple sites simultaneously. The User Details API
      receives and queues these requests, and the user information is then
      periodically processed and sent via email in JSON format.
security:
  - MuseumPlaceholderAuth: []
