openapi: 3.0.3
info:
  title: Customer api
  version: 0.0.1-dev
  description: Customer API documentation providing details for REST APIs
servers:
- url: https://api.apibuilder.io
paths:
  /customers/customers:
    get:
      description: Search for a specific customer. You must specify at least 1 parameter
        - either a guid, email or token - and will receive back either 0 or 1 users.
      parameters:
      - name: financialAccountNumber
        in: query
        description: Find customer with this financialAccountNumber. Exact match
        required: false
        schema:
          type: string
          format: uuid
      - name: email
        in: query
        description: Find user with this email address. Case in-sensitive. Exact match
        required: false
        schema:
          type: string
      - name: customerName
        in: query
        description: Find user with the specified nickname. For users that register
          via GitHub, this will be their GitHub username. Case in-sensitive. Exact
          match
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomer'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
    post:
      description: Create a new customer.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomerCreateForm'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomer'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
  /customers/{customerName}:
    get:
      description: Returns information about the user with this financialAccountNumber.
      parameters:
      - name: customerName
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomer'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
    put:
      description: Updates information about the customer with the specified financialAccountNumber.
      parameters:
      - name: customerName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomerUpdateForm'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsCustomer'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlatformIbmComCustomerApiV0ModelsError'
components:
  schemas:
    PlatformIbmComCustomerApiV0ModelsCustomerCreateForm:
      description: customer Creation Form
      type: object
      required:
      - branchNumber
      - customerName
      - email
      - address1
      - city
      - state
      - zip
      properties:
        branchNumber:
          description: Branch Number
          type: string
        customerName:
          description: customer Name
          type: string
        email:
          description: Email
          type: string
        address1:
          description: Address1
          type: string
        address2:
          description: Address2
          type: string
        city:
          description: City
          type: string
        state:
          description: State
          type: string
        zip:
          description: Zip
          type: string
    PlatformIbmComCustomerApiV0ModelsError:
      type: object
      required:
      - code
      - description
      properties:
        code:
          description: Machine readable code for this specific error message
          type: string
        description:
          description: Description of the error
          type: string
    PlatformIbmComCustomerApiV0ModelsCustomerUpdateForm:
      description: customer Update Form
      type: object
      required:
      - financialAccountNumber
      - customerName
      - email
      - address1
      - address2
      - city
      - state
      - zip
      properties:
        financialAccountNumber:
          description: Financial Account Number
          type: string
        customerName:
          description: Customer Name
          type: string
        email:
          description: Email
          type: string
        address1:
          description: Address1
          type: string
        address2:
          description: Address2
          type: string
        city:
          description: City
          type: string
        state:
          description: State
          type: string
        zip:
          description: Zip
          type: string
    PlatformIbmComCustomerApiV0ModelsCustomerSummary:
      description: Customer Summery
      type: object
      required:
      - financialAccountNumber
      - customerName
      properties:
        financialAccountNumber:
          description: Financial Account Number
          type: string
          format: uuid
        customerName:
          description: Customer Name
          type: string
    PlatformIbmComCustomerApiV0ModelsCustomer:
      description: Customer
      type: object
      required:
      - financialAccountNumber
      - customerName
      - branchNumber
      properties:
        financialAccountNumber:
          description: financialAccountNumber
          type: string
          format: uuid
        customerName:
          description: customerName
          type: string
        branchNumber:
          description: branchNumber
          type: string
        address1:
          description: address1
          type: string
        address2:
          description: address2
          type: string
        city:
          description: city
          type: string
        state:
          description: state
          type: string
        zip:
          description: zip
          type: string
