Smart Pension Opt In Request API

The OptInRequest API from Smart Pension — 2 operation(s) for optinrequest.

OpenAPI Specification

smart-pension-optinrequest-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Opt In Request API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: OptInRequest
paths:
  /companies/{company_id}/employees/{employee_id}/opt_in_requests/{id}:
    put:
      summary: Companies/Employees/OptInRequests/Update
      tags:
      - OptInRequest
      security:
      - oAuth2:
        - user
        - customer
      parameters:
      - name: id
        in: path
        required: true
        example: 1
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 365
        schema:
          type: string
      - name: company_id
        in: path
        required: true
        example: 730
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              success:
                value:
                  approved: true
            schema:
              type: object
              properties:
                approved:
                  type: boolean
      responses:
        '204':
          description: Success
    patch:
      summary: Companies/Employees/OptInRequests/Update
      tags:
      - OptInRequest
      security:
      - oAuth2:
        - user
        - customer
      parameters:
      - name: id
        in: path
        required: true
        example: 2
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 366
        schema:
          type: string
      - name: company_id
        in: path
        required: true
        example: 732
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              success:
                value:
                  approved: true
            schema:
              type: object
              properties:
                approved:
                  type: boolean
      responses:
        '204':
          description: Success
  /companies/{company_id}/opt_in_requests:
    get:
      summary: Companies/OptInRequests/List
      tags:
      - OptInRequest
      security:
      - oAuth2:
        - user
        - customer
      parameters:
      - name: company_id
        in: path
        required: true
        example: 1223
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                limit: 50
                offset: 0
                total: 0
                links:
                - rel: self
                  title: self
                  href: http://api.host.com/companies/1223/opt_in_requests
                - rel: first
                  title: first
                  href: http://api.host.com/companies/1223/opt_in_requests?offset=0&limit=50
                - rel: last
                  title: last
                  href: http://api.host.com/companies/1223/opt_in_requests?offset=0&limit=50
                opt_in_requests: []
components:
  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