Smart Pension Todo Items API

The TodoItems API from Smart Pension — 2 operation(s) for todoitems.

OpenAPI Specification

smart-pension-todoitems-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keystone Todo Items API
  version: v12
  description: This is the endpoint description of Keystone API.
servers:
- url: https://api.sandbox.autoenrolment.co.uk
- url: /
tags:
- name: TodoItems
paths:
  /companies/{company_id}/employees/{employee_id}/todo_items/complete:
    patch:
      summary: TodoItems/Complete
      tags:
      - TodoItems
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 908
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 497
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              success:
                value:
                  names:
                  - download_mobile_app
                  - combine_pensions
              invalid_parameters:
                value:
                  names:
                  - invalid
            schema:
              type: object
              properties:
                names:
                  type: array
                  items:
                    enum:
                    - download_mobile_app
                    - explore_financial_wellbeing
                    - see_how_your_money_is_invested
                    - find_lost_pensions
                    - combine_pensions
                    - visit_income_adequacy_page
      responses:
        '204':
          description: Success
        '401':
          description: Unauthorized
        '422':
          description: Invalid parameters
          content:
            application/json:
              example:
                errors:
                - code: 100002
                  title: Value is not valid for the field.
                  detail: 'Names should be one of the following values: download_mobile_app, explore_financial_wellbeing, see_how_your_money_is_invested, find_lost_pensions, combine_pensions, and visit_income_adequacy_page.'
                  meta:
                    values:
                    - download_mobile_app
                    - explore_financial_wellbeing
                    - see_how_your_money_is_invested
                    - find_lost_pensions
                    - combine_pensions
                    - visit_income_adequacy_page
                    value:
                    - invalid
                  source:
                    pointer: /data/attributes/names
  /companies/{company_id}/employees/{employee_id}/todo_items:
    get:
      summary: TodoItems/List
      tags:
      - TodoItems
      security:
      - oAuth2:
        - employee
      parameters:
      - name: company_id
        in: path
        required: true
        example: 911
        schema:
          type: string
      - name: employee_id
        in: path
        required: true
        example: 500
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                limit: 50
                offset: 0
                total: 3
                links:
                - rel: self
                  title: self
                  href: http://api.host.com/companies/911/employees/500/todo_items
                - rel: first
                  title: first
                  href: http://api.host.com/companies/911/employees/500/todo_items?offset=0&limit=50
                - rel: last
                  title: last
                  href: http://api.host.com/companies/911/employees/500/todo_items?offset=0&limit=50
                todo_items:
                - name: download_mobile_app
                  status: pending
                  owner_id: 500
                  owner_type: Account
                - name: explore_financial_wellbeing
                  status: pending
                  owner_id: 500
                  owner_type: Account
                - name: combine_pensions
                  status: completed
                  owner_id: 500
                  owner_type: Account
              schema:
                type: object
                properties:
                  limit:
                    type:
                    - integer
                    - 'null'
                  offset:
                    type:
                    - integer
                    - 'null'
                  total:
                    type:
                    - integer
                    - 'null'
                  links:
                    type: array
                    items:
                      $ref: '#/components/schemas/link'
                  todo_items:
                    type:
                    - array
                    - 'null'
                    items:
                      $ref: '#/components/schemas/response_todo_item'
        '401':
          description: Unauthorized
components:
  schemas:
    link:
      type: object
      properties:
        rel:
          type: string
        title:
          type: string
        href:
          type: string
    response_todo_item:
      type: object
      properties:
        name:
          type: string
        status:
          type: string
        owner_id:
          type: integer
        owner_type:
          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