Smart Pension Add Money Forms API

The AddMoneyForms API from Smart Pension — 2 operation(s) for addmoneyforms.

OpenAPI Specification

smart-pension-addmoneyforms-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Add Money Forms API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: AddMoneyForms
paths:
  /companies/{company_id}/employees/{employee_id}/add_money_forms/{type}:
    post:
      summary: AddMoneyForms/Create
      tags:
      - AddMoneyForms
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 245
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 59
        schema:
          type: string
      - name: type
        in: path
        schema:
          type: string
          enum:
          - single
          - recurring
        required: true
        example: single
      requestBody:
        content:
          application/json:
            example: null
      responses:
        '201':
          description: Success
          content:
            application/json:
              example:
                id: 1
                account_id: 59
                expires_at: '2025-03-02T00:00:00.000+00:00'
                ras_consent_at: null
                ras_personal_data:
                  email: employee_100@example.com
                  title: Captain
                  first_name: Billy
                  middle_name: null
                  last_name: Price
                  line1: 601 Artisan Lane
                  line2: null
                  line3: null
                  city: Isleton
                  country: United Kingdom of Great Britain and Northern Ireland
                  postcode: '97945'
                  date_of_birth: '2000-03-01'
                  national_insurance_number: null
                  employment_type: null
                  tax_residency_status: null
                submitted_at: null
                type: single
                created_at: '2025-03-01T00:00:00.000+00:00'
                updated_at: '2025-03-01T00:00:00.000+00:00'
                status: outstanding
                tasks:
                - name: ras_data
                  status: data_missing
                - name: verification_check
                  status: not_required
              schema:
                $ref: '#/components/schemas/response_add_money_form_summary'
        '403':
          description: Forbidden - Active add money form already exists
    get:
      summary: AddMoneyForms/Get
      tags:
      - AddMoneyForms
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 249
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 61
        schema:
          type: string
      - name: type
        in: path
        schema:
          type: string
          enum:
          - single
          - recurring
        required: true
        example: single
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                id: 3
                account_id: 61
                expires_at: '2025-03-02T00:00:00.000+00:00'
                ras_consent_at: null
                ras_personal_data:
                  email: test@mail.com
                  title: Mr
                  first_name: John
                  middle_name: A.
                  last_name: Doe
                  line1: 123 Main St
                  line2: Apt 4B
                  line3: Apt 4B
                  city: Anytown
                  postcode: '12345'
                  date_of_birth: '1990-01-01'
                  national_insurance_number: QQ123456C
                  tax_residency_status: Scotland
                  employment_type: employed
                submitted_at: null
                type: single
                created_at: '2025-03-01T00:00:00.000+00:00'
                updated_at: '2025-03-01T00:00:00.000+00:00'
                status: outstanding
                tasks:
                - name: ras_data
                  status: outstanding
                - name: verification_check
                  status: not_required
              schema:
                $ref: '#/components/schemas/response_add_money_form_summary'
        '404':
          description: Not Found
  /companies/{company_id}/employees/{employee_id}/add_money_forms/{type}/submit_ras_consent:
    patch:
      summary: AddMoneyForms/SubmitRasConsent
      tags:
      - AddMoneyForms
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 253
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 63
        schema:
          type: string
      - name: type
        in: path
        schema:
          type: string
          enum:
          - single
          - recurring
        required: true
        example: single
      requestBody:
        content:
          application/json:
            example: null
      responses:
        '204':
          description: Success
        '404':
          description: Not Found
components:
  schemas:
    response_add_money_form_summary:
      type: object
      properties:
        id:
          type:
          - integer
          - 'null'
        account_id:
          type:
          - integer
          - 'null'
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        ras_consent_at:
          type:
          - string
          - 'null'
          format: date-time
        ras_personal_data:
          type: object
        submitted_at:
          type:
          - string
          - 'null'
          format: date-time
        type:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        status:
          type:
          - string
          - 'null'
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/response_add_money_form_task'
    response_add_money_form_task:
      type: object
      properties:
        name:
          type: string
        status:
          type: string
  securitySchemes:
    oAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.sandbox.autoenrolment.co.uk/oauth/authorize
          tokenUrl: https://id.sandbox.autoenrolment.co.uk/oauth/token
          scopes:
            customer: 'Manage the customer''s company.

              - Create postponements

              - Create and import contributions

              - Edit company details

              - Add and edit employees'
            user: 'Manage all companies linked to the user''s adviser.

              - Manage adviser details

              - Add and edit adviser''s users

              - Create and import contributions for any company managed by the adviser'
            employee: 'Manage the employee account.

              - List employee contributions

              - Edit employee details and preferences'
x-samples-languages:
- curl
x-proxy-enabled: false