Astrada enrollment-methods API

Enrollment methods resource

OpenAPI Specification

astrada-enrollment-methods-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Astrada bank-accounts enrollment-methods API
  version: '2024-02-28'
  contact:
    email: developer@astrada.co
  description: 'Welcome to our API Reference. 👋

    '
servers:
- url: https://api.astrada.co
security: null
tags:
- name: enrollment-methods
  description: Enrollment methods resource
paths:
  /enrollment-methods:
    post:
      tags:
      - enrollment-methods
      summary: List the available enrollment methods given a card BIN (BETA)
      description: '🚧 **Beta** — This endpoint is in beta. Its results may not be accurate, so don''t rely on it as a fully-supported endpoint yet.


        List the available enrollment methods given a card BIN.'
      security:
      - main-auth:
        - enrollment-methods:write
      operationId: EnrollmentMethods
      requestBody:
        description: Enrollment methods payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - bin
              properties:
                bin:
                  description: The card's Bank Identification Number (BIN), consisting of the first 6 to 11 digits of the card number. Providing more digits yields more precise results — for example, two cards that share the same 6-digit BIN may support different enrollment methods. We recommend providing as many digits as available, up to 11.
                  type: string
                  pattern: ^\d{6,11}$
            examples:
              EnrollmentGuidanceRequestExample:
                value:
                  bin: '42424242'
      responses:
        '200':
          description: Successful operation
          content:
            application/hal+json:
              schema:
                type: object
                required:
                - availableEnrollmentMethods
                properties:
                  availableEnrollmentMethods:
                    type: array
                    items:
                      type: string
                      enum:
                      - network-bulk
                      - cardholder-single
              examples:
                Success example with card supported by single card enrollment flow:
                  value:
                    availableEnrollmentMethods:
                    - cardholder-single
                Success example with card supported by single card enrollment and network bulk enrollment flows:
                  value:
                    availableEnrollmentMethods:
                    - network-bulk
                    - cardholder-single
        '400':
          $ref: '#/components/responses/bad-request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '413':
          $ref: '#/components/responses/content-too-large'
        '500':
          $ref: '#/components/responses/server-error'
components:
  responses:
    content-too-large:
      description: Content Too Large
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
                enum:
                - Content Too Large
            required:
            - detail
            - title
          example:
            title: Content Too Large
            detail: The size of the request payload exceeds the maximum limit allowed by the server. Please reduce the size of your request.
    unauthorized:
      description: Authentication credentials were either missing or incorrect
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
                enum:
                - Unauthorized
            required:
            - detail
            - title
          example:
            title: Unauthorized
            detail: Authentication credentials were either missing or incorrect.
    forbidden:
      description: Authentication credentials used do not have have permissions to perform the request
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
                enum:
                - Forbidden
            required:
            - detail
            - title
          example:
            title: Forbidden
            detail: You do not have permission to access the requested resource.
    server-error:
      description: The server encountered an unexpected condition that prevented it from fulfilling the request
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
                enum:
                - Internal Server Error
            required:
            - detail
            - title
          example:
            title: Internal Server Error
            detail: The server encountered an unexpected condition that prevented it from fulfilling the request.
    bad-request:
      description: The server cannot or will not process the request due to something that is perceived to be a client error
      content:
        application/problem+json:
          schema:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
                enum:
                - Bad Request
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                    detail:
                      type: string
                  required:
                  - title
                  - detail
            required:
            - detail
            - title
          examples:
            Example Generic Bad Request Payload Response:
              value:
                title: Bad Request
                detail: Request object failed validation.
            Example Generic Bad Request Parameters Response:
              value:
                title: Bad Request
                detail: Request parameters are invalid.
  securitySchemes:
    main-auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.astrada.co/auth/realms/{accountId}/protocol/openid-connect/token
          refreshUrl: https://api.astrada.co/auth/realms/{accountId}/protocol/openid-connect/token
          scopes:
            accounts:write: Accounts write resource
            accounts:read: Accounts read resource
            subaccounts:write: Subaccounts write resource
            subaccounts:read: Subaccounts read resource
            card-connector-data-links:write: card-connector-data-link resource
            card-connector-consents:read: Card Consent read resource
            card-connector-consents:write: Card Consent write resource
            webhooks:read: Read Webhook resources
            webhooks:write: Write Webhook resources
            card-subscriptions:write: Create card subscription
            card-subscriptions:read: Read card subscription
            card-verifications:write: Create card verification
            card-verifications:read: Read Card verification
            cards:read: Read Card resources
            cardholder:read: Read Cardholder resources
            cardholder:write: Write Cardholder resources
            transactions:read: Read Transaction resources
            transaction-messages:read: Read Transaction Message resources
            network-bulk-feeds:read: Read network bulk feed
            network-bulk-feeds:write: Write network bulk feed
            network-links:write: Write network link
            enrollment-methods:write: Write enrollment methods
            simulation:write: Write sandbox simulations
            banking:read: Read banking resources
            banking:write: Write banking resources
            banking:admin: Admin banking operations
            appstore:enrollment:write: Enroll cards via the appstore B2C flow
            appstore:cards:read: View enrolled cards in the appstore
            appstore:transactions:read: View synced transactions in the appstore
            appstore:transactions:sync: Trigger transaction sync in the appstore
            appstore:sessions:read: Read appstore session state
            appstore:sessions:write: Write or delete appstore session state
            appstore:tokens:read: Read appstore stored tokens and connections
            appstore:tokens:write: Write appstore stored tokens and connections
externalDocs:
  description: Find out more about Astrada API.
  url: https://docs.astrada.co/reference