Puzzle Requests API

The Requests API from Puzzle — 1 operation(s) for requests.

OpenAPI Specification

puzzle-requests-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Requests API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Requests
paths:
  /company/{id}/requests:
    get:
      operationId: requests
      summary: Get Requests
      description: 'Retrieve a list of requests in a company.


        Required scope: read:company'
      tags:
      - Requests
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: status
        in: query
        required: false
        schema:
          type: string
      - name: type
        in: query
        required: false
        schema:
          type: string
      - name: transactionIds
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            description: Partner-facing external identifier
          - type: array
            items:
              type: string
              minLength: 1
              description: Partner-facing external identifier
      - name: requestedUserIds
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            description: Partner-facing external identifier
          - type: array
            items:
              type: string
              minLength: 1
              description: Partner-facing external identifier
      - name: requestedByUserIds
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            description: Partner-facing external identifier
          - type: array
            items:
              type: string
              minLength: 1
              description: Partner-facing external identifier
      - name: startDate
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: endDate
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        transactionId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        status:
                          type: string
                          enum:
                          - Cancelled
                          - Completed
                          - Open
                        type:
                          type: string
                          enum:
                          - CategoryReview
                          - Documentation
                          - Message
                          - Integration
                        requestedByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        requestedUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        requestedUserEmail:
                          type: string
                          nullable: true
                        requestedByUserEmail:
                          type: string
                          nullable: true
                        requestedByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        requestedUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        requestedByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        requestedUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        completedByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        completedByUserEmail:
                          type: string
                          nullable: true
                        completedByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        completedByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        cancelledByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        cancelledByUserEmail:
                          type: string
                          nullable: true
                        cancelledByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        cancelledByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        message:
                          type: string
                          nullable: true
                      required:
                      - id
                      - transactionId
                      - status
                      - type
                      - requestedByUserId
                      - requestedUserId
                      - requestedUserEmail
                      - requestedByUserEmail
                      - requestedByUserPosition
                      - requestedUserPosition
                      - requestedByUserFirmGroups
                      - requestedUserFirmGroups
                      - completedByUserId
                      - completedByUserEmail
                      - completedByUserPosition
                      - completedByUserFirmGroups
                      - cancelledByUserId
                      - cancelledByUserEmail
                      - cancelledByUserPosition
                      - cancelledByUserFirmGroups
                      - message
                required:
                - requests
    post:
      operationId: createRequests
      summary: Create Requests
      description: 'Creates category, documentation, and message requests in a company for a transaction.


        Required scope: write:request'
      tags:
      - Requests
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transactionId:
                  type: string
                  minLength: 1
                  description: Partner-facing external identifier
                requests:
                  type: object
                  properties:
                    categoryReview:
                      type: object
                      properties:
                        requestedUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        status:
                          type: string
                          enum:
                          - Cancelled
                          - Completed
                          - Open
                      required:
                      - status
                    documentationReview:
                      type: object
                      properties:
                        requestedUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        status:
                          type: string
                          enum:
                          - Cancelled
                          - Completed
                          - Open
                      required:
                      - status
                    messages:
                      type: array
                      items:
                        type: object
                        properties:
                          message:
                            type: string
                            minLength: 1
                        required:
                        - message
              required:
              - transactionId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionId:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        transactionId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        status:
                          type: string
                          enum:
                          - Cancelled
                          - Completed
                          - Open
                        type:
                          type: string
                          enum:
                          - CategoryReview
                          - Documentation
                          - Message
                          - Integration
                        requestedByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        requestedUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        requestedUserEmail:
                          type: string
                          nullable: true
                        requestedByUserEmail:
                          type: string
                          nullable: true
                        requestedByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        requestedUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        requestedByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        requestedUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        completedByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        completedByUserEmail:
                          type: string
                          nullable: true
                        completedByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        completedByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        cancelledByUserId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        cancelledByUserEmail:
                          type: string
                          nullable: true
                        cancelledByUserPosition:
                          type: string
                          enum:
                          - Founder
                          - CompanyEmployee
                          - OutsourcedAccountantOrCFO
                          nullable: true
                        cancelledByUserFirmGroups:
                          type: array
                          items:
                            type: string
                          nullable: true
                        message:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                        updatedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                      required:
                      - id
                      - transactionId
                      - status
                      - type
                      - requestedByUserId
                      - requestedUserId
                      - requestedUserEmail
                      - requestedByUserEmail
                      - requestedByUserPosition
                      - requestedUserPosition
                      - requestedByUserFirmGroups
                      - requestedUserFirmGroups
                      - completedByUserId
                      - completedByUserEmail
                      - completedByUserPosition
                      - completedByUserFirmGroups
                      - cancelledByUserId
                      - cancelledByUserEmail
                      - cancelledByUserPosition
                      - cancelledByUserFirmGroups
                      - message
                      - createdAt
                      - updatedAt
                required:
                - transactionId
                - requests