openapi: 3.0.1
info:
  title: Grant List API
  description: >-
    The Grant List API is used as an internal fraud and risk mitigation tool for
    merchants performing remittance transactions. Merchants can add account
    information to the Grant List database using the /account operation to let
    us know which account(s) to use for deposits.

     

    Upon receiving the remittance transaction request, Payments-API checks that
    the account specified in the request exists in the Grant List database for
    that merchant. The Grant List API requires [Basic
    Authentication](/gettingstarted#basic-authentication).

     

    __Production Server URL: `https://api.nelnetpay.com/grantlist`__
  version: 1.1.5
servers:
  - url: https://api.uat.nelnetpay.com/grantlist
    description: UAT
security:
  - bearerAuth: []
    basicAuth: []
paths:
  /check: {}
  /account:
    post:
      summary: Add or Remove an account from Grant List
      description: >
        Perform a request to add or remove an account from the Grant List. 


        This endpoint uses a valid Basic Authentication username and password
        for authentication.
      operationId: addToAchGrantlist
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddAchGrantlist'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/AccountSuccessResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          description: Unauthorized
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - basicAuth: []
components:
  schemas:
    CheckAchGrantlist:
      required:
        - accountNumber
        - associationId
        - routingNumber
      type: object
      properties:
        accountNumber:
          type: string
          description: The client’s bank account number.
          example: '12345677898'
        routingNumber:
          type: string
          description: The routing number identifying the client’s bank.
          example: '051000017'
        associationId:
          type: string
          description: The client's associationId.
          example: '3256'
    AddAchGrantlist:
      required:
        - accountNumber
        - active
        - routingNumber
      type: object
      properties:
        accountNumber:
          type: string
          description: The client’s bank account number.
          example: '12345677898'
        routingNumber:
          type: string
          description: The routing number identifying the client’s bank.
          example: '051000017'
        active:
          type: boolean
          description: >-
            Indicates whether the request is to add or remove an account to or
            from the Grant List database.
          example: true
          default: true
  responses:
    CheckSuccessResponse:
      description: Ok
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: object
                properties:
                  valid:
                    type: boolean
                    example: true
                  status:
                    type: string
                    example: success
    AccountSuccessResponse:
      description: Ok
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: object
                properties:
                  status:
                    type: string
                    example: success
    BadRequestResponse:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: object
                properties:
                  status:
                    type: string
                    example: failure
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: '1008'
                        description:
                          type: string
                          example: Routing Number required, must be numeric ...
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: object
                properties:
                  status:
                    type: string
                    example: failure
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          example: '500'
                        description:
                          type: string
                          example: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      description: Bearer Authentication Token for /check endpoint
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: Basic Authentication Username & Password for /account endpoint
      scheme: basic
