TreasurySpring Tasks API

Get information about Pending Tasks

OpenAPI Specification

treasuryspring-tasks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: api-support@treasuryspring.com
    name: API Support
    url: https://treasuryspring.com/
  description: TreasurySpring's Public API provides access to an authorised user's data, including holdings, entities, cells, obligor exposures, subscriptions, tasks, and more.
  summary: '**REST API for integration with TreasurySpring**'
  title: TreasurySpring Public Calendar Tasks API
  version: v0.7.3
  x-logo:
    altText: TreasurySpring logo
    url: /assets/TS_Logo.png
servers:
- description: Production Server
  url: https://api.treasuryspring.com/api/v1
- description: Sandbox Server
  url: https://api.sandbox.treasuryspring.com/api/v1
tags:
- description: Get information about Pending Tasks
  name: Tasks
paths:
  /task:
    get:
      description: Retrieves a list of all pending tasks that the user has.
      operationId: get.tasks
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Task'
                type: array
          description: List of pending tasks
      security:
      - bearerAuth: []
      summary: Get a list of all pending tasks
      tags:
      - Tasks
      x-codeSamples:
      - label: Curl
        lang: Curl
        source: "\ncurl -X GET 'https://api.treasuryspring.com/api/v1/task' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: Bearer 215ced3397d7049289b0bf6ce72dbbfcf'\n"
  /task/{uid}:
    get:
      description: Retrieves a pending task by uid.
      operationId: get.task
      parameters:
      - description: Task uid
        in: path
        name: uid
        required: true
        schema:
          description: Task uid
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: Info on pending task
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Get single pending task
      tags:
      - Tasks
      x-codeSamples:
      - label: Curl
        lang: Curl
        source: "\ncurl -X GET 'https://api.treasuryspring.com/api/v1/task/eab64d0f8h9c48038ce0dk451c77hg98' \\\n    -H 'accept: application/json' \\\n    -H 'Authorization: Bearer 215ced3397d7049289b0bf6ce72dbbfcf'\n"
    post:
      description: Used to approve or deny a pending task.
      operationId: post.task
      parameters:
      - description: Task uid
        in: path
        name: uid
        required: true
        schema:
          description: Task uid
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitTaskBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitTaskResponse'
          description: Status of submitted task
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Submit a task
      tags:
      - Tasks
      x-codeSamples:
      - label: Curl
        lang: Curl
        source: "\ncurl -X POST 'https://api.treasuryspring.com/api/v1/task/eab64d0f8h9c48038ce0dk451c77hg98' \\\n    -H 'accept: application/json' \\\n    -H 'Content-Type: application/json' \\\n    -H 'Authorization: Bearer 215ced3397d7049289b0bf6ce72dbbfcf' \\\n    -d '{\n        \"data\": {\n            \"approved\": true\n        }\n    }'\n"
components:
  schemas:
    SubmitTaskBody:
      description: Submit task body schema.
      properties:
        data:
          additionalProperties: true
          description: A JSON object containing the form data to be submitted for the task. The structure of the JSON object depends on the task type and can be found in the task properties.
          examples:
          - approved: true
          type: object
      required:
      - data
      type: object
      x-tags:
      - Tasks
    Task:
      description: Task schema.
      properties:
        data:
          additionalProperties: true
          description: A JSON object containing the task data, structured in JSON Schema format. This field includes a detailed schema representation of the task, as well as an embedded HTML description for visual rendering. The schema contains metadata about the form, including labels, input elements, and structure, which can be used to render a dynamic form in a UI.
          examples:
          - schema:
              description: "<table>\n <tbody>\n <tr>\n <th>User: </th>\n <td>example@treasuryspring.com</td>\n </tr>\n <tr>\n <th>First name: </th>\n <td>John</td>\n </tr>\n <tr>\n <th>Last name: </th>\n <td>Doe</td>\n </tr>\n <tr>\n <th>Role: </th>\n <td>None</td>\n </tr>\n <tr>\n <th>Entity: </th>\n <td>TEST0001</td>\n </tr>\n <tr>\n <th>Branding: </th>\n <td>None</td>\n </tr>\n <tr>\n <th>Include in default mailing list: </th>\n <td>True</td>\n </tr>\n <tr>\n <th>Phone: </th>\n <td>None</td>\n </tr>\n <tr>\n <th>Send welcome email: </th>\n <td>True</td>\n </tr>\n </tbody>\n</table>"
              properties:
                approve:
                  type: boolean
              type: object
            ui: {}
          type: object
        expiry:
          description: The expiry datetime of the task (timezone aware). Null if the task does not expire.
          examples:
          - '2024-01-01T00:00:00'
          format: date-time
          type:
          - string
          - 'null'
        uid:
          description: Task uid
          examples:
          - edd29e94ebe2417f8fedbcbdc039da84
          type: string
      required:
      - uid
      - data
      - expiry
      type: object
      x-tags:
      - Tasks
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      required:
      - loc
      - msg
      - type
      type: object
    SubmitTaskResponse:
      description: Submit task response schema.
      properties:
        error:
          description: Error message if the task was not successfully submitted.
          examples:
          - null
          type:
          - string
          - 'null'
        success:
          description: Indicates if the task was successfully submitted or not.
          examples:
          - true
          type: boolean
      required:
      - success
      type: object
      x-tags:
      - Tasks
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
  securitySchemes:
    basicAuth:
      description: 'Base64-encoded `client_id:client_secret` (sent as `Authorization: Basic <base64>`). Used by the OAuth token-exchange endpoint.'
      scheme: basic
      type: http
    bearerAuth:
      description: 'API Key or OAuth access token (sent as `Authorization: Bearer <token>`).'
      scheme: bearer
      type: http
x-tagGroups:
- name: Guides
  tags:
  - Introduction
  - FTF Lifecycle
- name: Endpoints
  tags:
  - OAuth
  - Holdings
  - Indications
  - Entities
  - Cells
  - Obligor Exposure
  - Subscriptions
  - Tasks
  - Calendar
  - Events
  - Event Checkpoints
  - Webhooks
  - Healthcheck
- name: Models
  tags:
  - Holding_model
  - Indication_model
  - Cell_model
  - Obligor_model
  - Subscription_model
  - Task_model
  - Entity_model
  - User_permissions_model
  - Holiday_model
  - PageInfo_model
  - Checkpoint_model
- name: Event Models
  tags:
  - Event_model
  - SubscribedEvent_model
  - IssuedEvent_model
  - SplitEvent_model
  - ExtendedEvent_model
  - FinalizedEvent_model
  - AdjustedEvent_model
  - CurrencyConvertedEvent_model
  - CashMovedEvent_model
  - RedeemedEvent_model
  - CancelledEvent_model
- name: MCP
  tags:
  - MCP