get:
  operationId: getAccount
  tags:
    - Accounts
  summary: Account Details
  description: >-
    This API returns the details for a single account based on the ID.  

    A token with ORG_ADMIN authority is required to call this API.
  security:
    - oauth2: [idn:account:read]
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The account ID
      example: ef38f94347e94562b5bb8424a56397d8
  responses:
    "200":
      description: An account object
      content:
        application/json:
          schema:
            $ref: "../schemas/Account.yaml"
    "400":
      $ref: "../responses/400.yaml"
    "401":
      $ref: "../responses/401.yaml"
    "403":
      $ref: "../responses/403.yaml"
    "404":
      $ref: "../responses/404.yaml"
    "429":
      $ref: "../responses/429.yaml"
    "500":
      $ref: "../responses/500.yaml"
patch:
  operationId: updateAccount
  tags:
    - Accounts
  summary: Update Account
  description: >-
    Use this API to modify the following fields:

    * `identityId`


    * `manuallyCorrelated`


    >**NOTE: All other fields can not be modified.**


    The request must provide a JSONPatch payload.


    A token with ORG_ADMIN authority is required to call this API.
  security:
    - oauth2: [idn:account:update]
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The account ID
      example: ef38f94347e94562b5bb8424a56397d8
  requestBody:
    required: true
    description: >-
      A list of account update operations according to the [JSON
      Patch](https://tools.ietf.org/html/rfc6902) standard.
    content:
      application/json-patch+json:
        schema:
          type: array
          items:
            $ref: "../schemas/JsonPatchOperation.yaml"
        example:
          - op: "replace"
            path: "/identityId"
            value: "2c9180845d1edece015d27a975983e21"
  responses:
    "202":
      description: Accepted. Update request accepted and is in progress.
      $ref: "../responses/202.yaml"
    "400":
      $ref: "../responses/400.yaml"
    "401":
      $ref: "../responses/401.yaml"
    "403":
      $ref: "../responses/403.yaml"
    "404":
      $ref: "../responses/404.yaml"
    "429":
      $ref: "../responses/429.yaml"
    "500":
      $ref: "../responses/500.yaml"
put:
  operationId: putAccount
  tags:
    - Accounts
  summary: Update Account
  description: >-
    This API submits an account update task and returns the task ID.  

    A token with ORG_ADMIN authority is required to call this API.

    >**NOTE: The PUT Account API is designated only for Delimited File
    sources.**
  security:
    - oauth2: [idn:account:update]
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The account ID
      example: ef38f94347e94562b5bb8424a56397d8
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: "../schemas/AccountAttributes.yaml"
  responses:
    "202":
      description: Async task details
      content:
        application/json:
          schema:
            $ref: "../schemas/AccountsAsyncResult.yaml"
    "400":
      $ref: "../responses/400.yaml"
    "401":
      $ref: "../responses/401.yaml"
    "403":
      $ref: "../responses/403.yaml"
    "404":
      $ref: "../responses/404.yaml"
    "429":
      $ref: "../responses/429.yaml"
    "500":
      $ref: "../responses/500.yaml"
delete:
  operationId: deleteAccount
  tags:
    - Accounts
  summary: Delete Account
  description: >-
    This API submits an account delete task and returns the task ID. This
    operation can only be used on Flat File Sources. Any attempt to execute this
    request on the source of other type will result in an error response with a
    status code of 400.

    A token with ORG_ADMIN authority is required to call this API.
  security:
    - oauth2: [idn:account:delete]
  parameters:
    - in: path
      name: id
      schema:
        type: string
      required: true
      description: The account ID
      example: ef38f94347e94562b5bb8424a56397d8
  responses:
    "202":
      description: Async task details
      content:
        application/json:
          schema:
            $ref: "../schemas/AccountsAsyncResult.yaml"
    "400":
      $ref: "../responses/400.yaml"
    "401":
      $ref: "../responses/401.yaml"
    "403":
      $ref: "../responses/403.yaml"
    "404":
      $ref: "../responses/404.yaml"
    "429":
      $ref: "../responses/429.yaml"
    "500":
      $ref: "../responses/500.yaml"
