LayUp Technologies authService API

The authService API from LayUp Technologies — 6 operation(s) for authservice.

OpenAPI Specification

layup-technologies-authservice-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Layup endpoints AbsaDebiCheckService authService API
  version: 1.4.16
  description: 'Welcome to The Layup Swagger page. This page allows developers to interactively explore the API. For more detailed documentation see [The Layup documentation page](https://documentation.layup.co.za/).


    # Introduction


    ## What is LayUp


    LayUp is a lay-by payment solution. LayUp Schedules payments and ensures that your clients pay securely, effectively and on time. Depending on your parameters LayUp schedules a payment plan for your clients. Once a payment plan has been completed we notify you. There are 3 stories that are of importance to a merchant:


    1. Order Creation

    2. Deposit Received (and holding Stock for your client)

    3. Order Completion.


    LayUp allows you to take full control over the entire payment process if you wish to do so. We also provide a convenient front-end for users to use. The front-end should significantly reduce the time to integrate and get you started using LayUp as soon as possible.


    Once an order is completed a notification will be sent to the merchant so that you can provide the client with their product.


    ## How to use LayUp


    As a merchant who wants to place an order through LayUp, you want to send the relevant information to the LayUp API to create the order. The API will return an order ID. Unless your integration is using a custom user interface, you want to send the user to the LayUp customer payment widget. The URL for this widget is <u>https://shopper.layup.co.za/order/{orderId}</u> for production and <u>https://sandbox.layup.co.za/order/{orderId}</u> for sandbox.

    '
host: localhost:3000
schemes:
- http
- https
- wss
consumes:
- application/json
produces:
- application/json
security:
- apiKey:
  - read
  - write
tags:
- name: authService
paths:
  /v1/auth/apikey:
    get:
      summary: 'Warning: Calling this endpoint will replace any existing apikeys on your account.'
      operationId: authService_GenerateApiKey
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelApiKeyResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters: []
      tags:
      - authService
  /v1/auth/login:
    post:
      operationId: authService_Login
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelUserResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/modelLoginRequest'
      tags:
      - authService
  /v1/auth/register:
    post:
      operationId: authService_Register
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelUserResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/modelUserRequest'
      - name: _id
        in: query
        required: false
        type: string
      - name: avs
        in: query
        required: false
        type: string
      - name: isRealtimeVerification
        in: query
        required: false
        type: boolean
      tags:
      - authService
  /v1/auth/terminal-key:
    get:
      operationId: authService_GenerateTerminalApiKey
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelTerminalApiKeyResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters:
      - name: id
        in: query
        required: false
        type: string
      tags:
      - authService
  /v1/request-password-reset:
    post:
      operationId: authService_ForgotPassword
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelForgotPasswordResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/modelForgotPasswordRequest'
      tags:
      - authService
  /v1/send-billing-settlements-change-request:
    post:
      operationId: authService_MerchantBillingChangesRequest
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/modelMerchantBillingSettlementResponse'
        '204':
          description: Successfully processed the request, no content.
        '403':
          description: Returned when the user does not have permission to access the resource.
        '404':
          description: Returned when the resource does not exist.
      parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/modelMerchantBillingSettlementRequest'
      tags:
      - authService
definitions:
  modelBillingAddress:
    type: object
    properties:
      country:
        type: string
      province:
        type: string
      streetAddress:
        type: string
      city:
        type: string
      postalCode:
        type: string
  modelBankValidation:
    type: object
    properties:
      verified:
        type: boolean
      value:
        type: string
  modelUserResponse:
    type: object
    properties:
      _id:
        type: string
      username:
        type: string
      email:
        type: string
        format: email
      idNumber:
        type: string
      address:
        type: string
      postalCode:
        type: string
      city:
        type: string
      province:
        type: string
      country:
        type: string
      role:
        type: string
        enum:
        - CLIENT
        - MERCHANT
        - ADMIN
        default: CLIENT
      active:
        type: boolean
      merchantId:
        type: string
      cellNumber:
        type: string
      dateOfBirth:
        type: string
      name:
        type: string
      verified:
        type: boolean
      timestamp:
        type: number
        format: double
      hasPassword:
        type: boolean
      verifiedEmail:
        type: boolean
      verifiedMobile:
        type: boolean
      merchantRole:
        type: string
      bankDetails:
        $ref: '#/definitions/modelBankInfo'
      merchantOnboarding:
        $ref: '#/definitions/modelMerchantOnboarding'
      bankValidationPendingReference:
        type: string
      oneTimePass:
        type: string
      passportState:
        type: string
      passportNumber:
        type: string
      profileImage:
        type: string
      merchantIds:
        type: array
        items:
          type: string
      merchants:
        type: array
        items:
          type: object
          $ref: '#/definitions/modelMerchants'
      isMerchantOwner:
        type: boolean
      twoFactorAuthenticationRequired:
        type: boolean
  modelTerminalApiKeyResponse:
    type: object
    properties:
      terminalApiKey:
        type: string
  modelMerchantBillingSettlementRequest:
    type: object
    properties:
      merchantName:
        type: string
      userName:
        type: string
      userEmail:
        type: string
      merchantId:
        type: string
      merchantContactNumber:
        type: string
      message:
        type: string
  modelForgotPasswordResponse:
    type: object
    properties:
      status:
        type: string
  modelForgotPasswordRequest:
    type: object
    properties:
      value:
        type: string
      channel:
        type: string
      redirectTo:
        type: string
      isRealtimeVerification:
        type: boolean
  modelMerchantBillingSettlementResponse:
    type: object
    properties:
      status:
        type: string
  modelUserRequest:
    type: object
    properties:
      username:
        type: string
      email:
        type: string
        format: email
      idNumber:
        type: string
      address:
        type: string
      postalCode:
        type: string
      city:
        type: string
      province:
        type: string
      country:
        type: string
      role:
        type: string
        enum:
        - CLIENT
        - MERCHANT
        - ADMIN
        default: CLIENT
      password:
        type: string
      active:
        type: boolean
      name:
        type: string
      dateOfBirth:
        type: string
      cellNumber:
        type: string
        pattern: ^\+27\d{9}$
      redirectTo:
        type: string
      apikey:
        type: string
      shouldWelcome:
        type: boolean
      merchantCreatePlan:
        type: boolean
      merchantId:
        type: string
      merchantRole:
        type: string
      bankDetails:
        $ref: '#/definitions/modelBankInfo'
      merchantOnboarding:
        $ref: '#/definitions/modelMerchantOnboarding'
      bankValidationPendingReference:
        type: string
      passportState:
        type: string
      passportNumber:
        type: string
      profileImage:
        type: string
      merchantIds:
        type: array
        items:
          type: string
      isMerchantOwner:
        type: boolean
  modelLoginRequest:
    type: object
    properties:
      username:
        type: string
        required:
        - 'true'
      password:
        type: string
        format: password
        required:
        - 'true'
      rememberMe:
        type: boolean
  modelApiKeyResponse:
    type: object
    properties:
      apikey:
        type: string
  modelBankInfo:
    type: object
    properties:
      bankName:
        $ref: '#/definitions/modelBankValidation'
      account:
        $ref: '#/definitions/modelBankValidation'
      accountType:
        $ref: '#/definitions/modelBankValidation'
      branchCode:
        $ref: '#/definitions/modelBankValidation'
      idNumber:
        $ref: '#/definitions/modelBankValidation'
      verified:
        type: boolean
      clientName:
        $ref: '#/definitions/modelBankValidation'
      cellNumber:
        $ref: '#/definitions/modelBankValidation'
      initials:
        $ref: '#/definitions/modelBankValidation'
      email:
        $ref: '#/definitions/modelBankValidation'
      validationResponseErrors:
        type: array
        items:
          type: string
  modelMerchants:
    type: object
    properties:
      _id:
        type: string
      name:
        type: string
  modelMerchantOnboarding:
    type: object
    properties:
      name:
        type: string
      physicalAddress:
        $ref: '#/definitions/modelBillingAddress'
securityDefinitions:
  apiKey:
    type: apiKey
    name: apikey
    in: header