SPOTIO Autoplays API

The controller provides various endpoints for managing autoplays, which are automated workflows that can be triggered for dataObject in application. Allowed is adding / editing contacts and changing step status.

OpenAPI Specification

spotio-autoplays-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: v1
  title: Spotio 2.0 Autoplays API
  description: "\nThe controller provides various endpoints for managing autoplays, which are automated workflows that can be triggered for dataObject in application.\nAllowed is adding / editing contacts and changing step status. \n"
  contact:
    name: Contact us
    url: https://spotio.com/contact/
    email: support@spotio.com
servers:
- url: https://api.spotio2.com
  description: Production
- url: https://app-test.spotio2.com
  description: Test
security:
- Bearer: []
tags:
- name: Autoplays
  description: "\nThe controller provides various endpoints for managing autoplays, which are automated workflows that can be triggered for dataObject in application.\nAllowed is adding / editing contacts and changing step status. \n"
paths:
  /api/Autoplays/{autoplayId}/bulk/enroll:
    post:
      tags:
      - Autoplays
      summary: Enroll contacts into autoplay
      parameters:
      - name: autoplayId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
      security:
      - Bearer: []
      servers:
      - url: https://api.spotio2.com
        description: Production
      - url: https://app-test.spotio2.com
        description: Test
  /api/Autoplays/{autoplayId}/dataObjects:
    post:
      tags:
      - Autoplays
      summary: Enroll contacts into autoplay
      parameters:
      - name: autoplayId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
      security:
      - Bearer: []
      servers:
      - url: https://api.spotio2.com
        description: Production
      - url: https://app-test.spotio2.com
        description: Test
  /api/Autoplays/{autoplayId}/dataobjects:
    get:
      tags:
      - Autoplays
      summary: Get data objects per autoplay's step
      parameters:
      - name: filterId
        in: query
        schema:
          type: string
      - name: autoplayId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.DataObjectsPerStep'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.DataObjectsPerStep'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.DataObjectsPerStep'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '401':
          description: Unauthorized
        '415':
          description: Client Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '422':
          description: Client Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
        '500':
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Infrastructure.Common.DataModel.Error.Error'
      security:
      - Bearer: []
      servers:
      - url: https://api.spotio2.com
        description: Production
      - url: https://app-test.spotio2.com
        description: Test
  /api/Autoplays/dataObjects/{autoplayContactId}/steps/{autoplayContactStepId}:
    patch:
      tags:
      - Autoplays
      summary: Change autoplay contact step status and/or reschedule
      parameters:
      - name: autoplayContactId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: autoplayContactStepId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      security:
      - Bearer: []
      servers:
      - url: https://api.spotio2.com
        description: Production
      - url: https://app-test.spotio2.com
        description: Test
  /api/Autoplays/contacts/{autoplayContactId}/steps/{autoplayContactStepId}:
    patch:
      tags:
      - Autoplays
      summary: Change autoplay contact step status and/or reschedule
      parameters:
      - name: autoplayContactId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: autoplayContactStepId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
            application/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
            text/json:
              schema:
                $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      security:
      - Bearer: []
      servers:
      - url: https://api.spotio2.com
        description: Production
      - url: https://app-test.spotio2.com
        description: Test
components:
  schemas:
    Spotio.Frontend.ViewModel.Autoplays.DataObjectPerStep:
      type: object
      additionalProperties: false
      properties:
        dataObjectId:
          type:
          - string
          - 'null'
        name:
          type:
          - string
          - 'null'
        dataObjectOwnerId:
          type:
          - string
          - 'null'
        address:
          type:
          - string
          - 'null'
        value:
          type:
          - number
          - 'null'
          format: double
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type:
          - string
          - 'null'
          format: date-time
        stageId:
          type:
          - integer
          - 'null'
          format: int32
        navigationId:
          type:
          - string
          - 'null'
    Spotio.Autoplays.Client.Model.AutoplayDataObjectStepStatusDto:
      type: string
      enum:
      - Planned
      - Completed
      - Skipped
      - Attempted
      - Invalid
      - AttemptedRescheduled
    Spotio.Frontend.ViewModel.Autoplays.DataObjectEnrollment:
      type: object
      additionalProperties: false
      properties:
        dataObjectId:
          type:
          - string
          - 'null'
        name:
          type:
          - string
          - 'null'
        isValid:
          type: boolean
        errors:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Spotio.Autoplays.Client.Model.ValidationErrorTypeDto'
        alreadyEnrolled:
          type: boolean
        parentId:
          type:
          - string
          - 'null'
    Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepRequest:
      type: object
      additionalProperties: false
      properties:
        executionDate:
          type:
          - string
          - 'null'
          format: date-time
        status:
          $ref: '#/components/schemas/Spotio.Autoplays.Client.Model.AutoplayDataObjectStepStatusDto'
    Spotio.Frontend.ViewModel.Autoplays.BulkEnrollDataObjectsToAutoplayRequest:
      type: object
      additionalProperties: false
      properties:
        enrollWithPartialInfo:
          type: boolean
          description: Ignore missing dataObjects (contacts) fields (email or phone)
        enrollAlreadyEnrolled:
          type: boolean
        polygon:
          $ref: '#/components/schemas/Spotio.Frontend.ViewModel.DataObjects.BulkPolygonFilter'
        filterId:
          type:
          - string
          - 'null'
          description: Filter data objects by filter ID
        dataObjectIds:
          type:
          - array
          - 'null'
          description: IDs of the data objects to perform bulk actions on
          items:
            type: string
        q:
          type:
          - string
          - 'null'
          description: Search query
        singleType:
          type:
          - integer
          - 'null'
          description: Type ID of the data objects to perform bulk actions on, if only a single type is selected from workflow settings
          format: int32
    Spotio.Frontend.ViewModel.DataObjects.BulkPolygonFilter:
      type: object
      additionalProperties: false
      properties:
        points:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Spotio.Frontend.ViewModel.DataObjects.PolygonPoint'
    Spotio.Frontend.ViewModel.Autoplays.DataObjectsPerStep:
      type: object
      additionalProperties: false
      properties:
        stepId:
          type:
          - string
          - 'null'
        activityTemplateId:
          type:
          - string
          - 'null'
        auto:
          type: boolean
        description:
          type:
          - string
          - 'null'
        position:
          type: integer
          format: int32
        dataObjects:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.DataObjectPerStep'
    Spotio.Infrastructure.Common.DataModel.Error.Error:
      type: object
      additionalProperties: false
      properties:
        errors:
          readOnly: true
    Spotio.Frontend.ViewModel.DataObjects.PolygonPoint:
      type: object
      additionalProperties: false
      properties:
        lat:
          type: number
          format: double
        lng:
          type: number
          format: double
    Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsResponse:
      type: object
      additionalProperties: false
      properties:
        successfullyEnrolledCount:
          type: integer
          format: int32
        unsuccessfulEnrollments:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Spotio.Frontend.ViewModel.Autoplays.DataObjectEnrollment'
    Spotio.Frontend.ViewModel.Autoplays.AutoplayContactStepSimple:
      type: object
      additionalProperties: false
      properties:
        id:
          type:
          - string
          - 'null'
        executionDate:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/Spotio.Autoplays.Client.Model.AutoplayDataObjectStepStatusDto'
    Spotio.Autoplays.Client.Model.ValidationErrorTypeDto:
      type: string
      enum:
      - MissingPhoneNumber
      - MissingEmailAddress
      - UserHasNoPhoneNumber
      - UserHasNoEmailAddress
      - AutoEmailsLimitExceeded
      - RequiredC3
      - InvalidPhoneNumber
      - PhoneNumberOptedOut
      - TextOptInMissing
    Spotio.Frontend.ViewModel.Autoplays.EnrollDataObjectsRequest:
      type: object
      additionalProperties: false
      properties:
        enrollWithPartialInfo:
          type: boolean
          description: Ignore missing dataObjects (contacts) fields (email or phone)
        enrollAlreadyEnrolled:
          type: boolean
        dataObjectIds:
          type:
          - array
          - 'null'
          description: DataObjects (contacts) Ids
          items:
            type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: 'Enter the Bearer Authorization string as following: `Bearer Generated-JWT-Token`'
      name: Authorization
      in: header