Purplebricks Workflow API

Platform workflow service exposing workflow steps and an instruct-availability check that gates whether a seller can be instructed at a given point in the journey.

OpenAPI Specification

purplebricks-workflow-v1-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Purplebricks Workflow API 1.0 - Platform
  description: '### The new home for accessing the workflow service library

    ### [Purplebricks Workflow API Git Repository](https://purplebricks@dev.azure.com/purplebricks/Purplebricks/_git/workflow-api)'
  version: '1.0'
servers:
- url: https://api.purplebricks.co.uk/workflow
paths:
  /v1/isinstructavailable:
    get:
      tags:
      - IsInstructAvailable
      parameters:
      - name: propertyId
        in: query
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Success
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: integer
                format: int32
            application/json:
              schema:
                type: integer
                format: int32
            text/json:
              schema:
                type: integer
                format: int32
  /v1/step/canmove:
    get:
      tags:
      - Step
      parameters:
      - name: propertyId
        in: query
        schema:
          type: integer
          format: int32
      - name: type
        in: query
        schema:
          $ref: '#/components/schemas/WorkflowStepType'
      responses:
        '200':
          description: Success
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: integer
                format: int32
            application/json:
              schema:
                type: integer
                format: int32
            text/json:
              schema:
                type: integer
                format: int32
        '409':
          description: Conflict
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /v1/step/move:
    post:
      tags:
      - Step
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveToStepRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/MoveToStepRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/MoveToStepRequest'
      responses:
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MoveToStepResult'
            application/json:
              schema:
                $ref: '#/components/schemas/MoveToStepResult'
            text/json:
              schema:
                $ref: '#/components/schemas/MoveToStepResult'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: integer
                format: int32
            application/json:
              schema:
                type: integer
                format: int32
            text/json:
              schema:
                type: integer
                format: int32
        '409':
          description: Conflict
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/WorkflowStepType'
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowStepType'
            text/json:
              schema:
                $ref: '#/components/schemas/WorkflowStepType'
components:
  schemas:
    MoveToStepRequest:
      required:
      - propertyId
      - type
      - userId
      type: object
      properties:
        propertyId:
          type: integer
          format: int32
        type:
          $ref: '#/components/schemas/WorkflowStepType'
        userId:
          type: integer
          format: int32
        impersonationUserId:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    MoveToStepResult:
      type: object
      properties:
        success:
          type: boolean
        stepTypeMovedTo:
          $ref: '#/components/schemas/WorkflowStepType'
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    WorkflowStepType:
      enum:
      - Create
      - BookValuation
      - Valuation
      - Instruct
      - CreateAdvert
      - RejectAdvert
      - AmendAdvert
      - ApproveAdvert
      - SchedulePendingRegCert
      - Schedule
      - PublishPendingRegCert
      - Publish
      - Withdraw
      - Suspend
      - SuspendByUser
      - SuspendAccount
      - UnderOffer
      - SoldSubjectToContract
      - LetSubjectToContract
      - DeclineOffer
      - UpdateProperty
      - AcceptableOffer
      - ApplicationReceived
      - AcceptableOfferNotMarketed
      - WithdrawOffer
      - UpdateAdvert
      - ApprovePhoto
      - ContractsExchanged
      - Completion
      - SchedulePendingContract
      - PublishPendingContract
      - UpdatePropertyDiary
      - ContractsExchangedCoolingOffPeriod
      - ForceSold
      - ForceSoldSubjectToContract
      - ForceContractsExchanged
      - ForceCompletion
      - SoldSubjectToEscrow
      - PendingEscrow
      - Closing
      - ForceAcceptableOffer
      - ForceAcceptableOfferNotMarketed
      - ForceContractsExchangedCoolingOffPeriod
      - InstantValuation
      - FakeValuation
      - Cancelled
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: Authorization header using Bearer scheme
      name: Authorization
      in: header
security:
- Bearer: []