FieldPulse Assets API

Endpoints related to assets

OpenAPI Specification

fieldpulse-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FieldPulse Assets 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: Assets
  description: Endpoints related to assets
paths:
  /assets/{id}:
    get:
      tags:
      - Assets
      summary: Retrieve asset 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: getAssetsById
    put:
      tags:
      - Assets
      summary: Update asset by ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                title: ''
                status: ''
                customer_id: ''
                maintenance_agreement_id: ''
                asset_category_id: ''
                asset_type: ''
                is_template: ''
                tag: ''
                location: ''
                install_date: ''
                manufacturer: ''
                model: ''
                model_number: ''
                serial_number: ''
                model_year: ''
                model_details: ''
                warranty_expiration: ''
                labor_warranty_expiration: ''
                warranty_information: ''
                labor_warranty_information: ''
                condition: ''
                issues: ''
                notes: ''
                job_ids: ''
      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: putAssetsById
    delete:
      tags:
      - Assets
      summary: Delete asset 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: deleteAssetsById
  /assets:
    get:
      tags:
      - Assets
      summary: Retrieve assets list
      parameters:
      - name: status
        in: query
        schema:
          type: string
        description: Get by status. Possible statuses - uninstalled, installed, retired
        example: <string>
      - 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: search
        in: query
        schema:
          type: string
        description: Search string
        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>
      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: getAssets
    post:
      tags:
      - Assets
      summary: Create an asset
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                title: ''
                status: ''
                customer_id: ''
                maintenance_agreement_id: ''
                asset_category_id: ''
                asset_type: ''
                is_template: ''
                tag: ''
                location: ''
                install_date: ''
                manufacturer: ''
                model: ''
                model_number: ''
                serial_number: ''
                model_year: ''
                model_details: ''
                warranty_expiration: ''
                labor_warranty_expiration: ''
                warranty_information: ''
                labor_warranty_information: ''
                condition: ''
                issues: ''
                notes: ''
                job_ids: ''
      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: postAssets
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key