FieldPulse Subtasks API

The Subtasks API from FieldPulse — 2 operation(s) for subtasks.

OpenAPI Specification

fieldpulse-subtasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FieldPulse Subtasks API
  description: 'REST API for the FieldPulse field service management platform.


    **Authentication:** All requests require an `x-api-key` header. Contact support@fieldpulse.com to obtain your API key.


    **Important:** The API Playground below makes live requests against your production data. Use caution when testing write operations (POST, PUT, DELETE).'
  version: 1.0.0
servers:
- url: https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage
  description: Production
security:
- apiKeyAuth: []
tags:
- name: Subtasks
paths:
  /subtasks/{id}:
    get:
      tags:
      - Subtasks
      summary: Retrieve subtask by ID
      description: Retrieve a subtask by ID
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL or object not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      operationId: getSubtasksById
    put:
      tags:
      - Subtasks
      summary: Update subtask by ID
      description: Update a subtask
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                title: some string
                status: 1
                due_date: 1234567890
                customer_id: 1
                job_id: 1
                project_id: 1
                recurring_job_id: 1
                description: some string
                is_template: false
                is_required_for_job: false
                assignments:
                - team_id: 1
                  user_id: 1
                - team_id: 1
                  user_id: 2
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                error: true
                errors:
                - error message
                - error message
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL or object not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      operationId: putSubtasksById
    delete:
      tags:
      - Subtasks
      summary: Delete subtask by ID
      description: Delete a subtask
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL or object not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      operationId: deleteSubtasksById
  /subtasks:
    get:
      tags:
      - Subtasks
      summary: Retrieve subtasks list
      description: List subtasks
      parameters:
      - name: limit
        in: query
        schema:
          type: string
        description: Defaults to 20 items per page, maximum 100 items allowed.
        example: <string>
      - name: page
        in: query
        schema:
          type: string
        description: Page number. Starts from 1, defaults to 1.
        example: <string>
      - name: sort_by
        in: query
        schema:
          type: string
        description: 'Allowed values: due_date, status, title'
        example: <string>
      - name: sort_dir
        in: query
        schema:
          type: string
        description: 'Allowed values: asc, desc'
        example: <string>
      - name: assigned_user_id
        in: query
        schema:
          type: string
        description: Filter for assigned user id
        example: <string>
      - name: status
        in: query
        schema:
          type: string
        description: Filter by status. Allowed values - open, close
        example: <string>
      - name: calculate_count
        in: query
        schema:
          type: string
        description: true or false. If true, in response will be included also total count
        example: <boolean>
      - name: filter
        in: query
        schema:
          type: string
        description: Array of attribute, operator, and value parts.
        example: <array>
      - name: sort
        in: query
        schema:
          type: string
        description: Array of attribute and order values.
        example: <array>
      - name: rel
        in: query
        schema:
          type: string
        description: array consisting of indices with the desired relation to include
        example: <array>
      - name: asn
        in: query
        schema:
          type: string
        description: Array or object containing either a team_id index, assigned_members index containing an array of member ids, or both.
        example: <array>
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      operationId: getSubtasks
    post:
      tags:
      - Subtasks
      summary: Create a subtask
      description: Create a subtask
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                title: some string
                status: 1
                due_date: 1234567890
                customer_id: 1
                job_id: 1
                project_id: 1
                recurring_job_id: 1
                description: some string
                is_template: false
                is_required_for_job: false
                assignments:
                - team_id: 1
                  user_id: 1
                - team_id: 1
                  user_id: 2
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                error: true
                errors:
                - error message
                - error message
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
      operationId: postSubtasks
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key