OpenGov Receipt Comments API

The receiptComments API from OpenGov — 2 operation(s) for receiptcomments.

OpenAPI Specification

opengov-receiptcomments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenGov Receipt Receipt Comments API
  version: 1.0.0
  description: API for managing receipts.
servers:
- url: https://api-receipts.procurement.opengov.com
  description: Production
- url: https://api-receipts.procurement.ogstaging.us
  description: Staging
- url: https://api-receipts.procurement.ogintegration.us
  description: Integration
security: []
tags:
- name: receiptComments
paths:
  /api/v1/entities/{entityId}/receipts/{id}/comments:
    post:
      tags:
      - receiptComments
      operationId: receiptComments.createComment
      parameters:
      - name: entityId
        in: path
        schema:
          type: string
          description: The UUID of the Platform entity
          default: 04eb277c-f9cd-42b0-9610-0f068f6aaea1
        required: true
        description: The UUID of the Platform entity
      - name: id
        in: path
        schema:
          type: string
          description: a string to be decoded into a number
        required: true
        description: a string to be decoded into a number
      security:
      - platformApiKey: []
      - platformBearerToken: []
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - activity
                    properties:
                      activity:
                        type: object
                        required:
                        - activityId
                        - entryType
                        - commentId
                        - visibilityScope
                        - body
                        - author
                        - attachments
                        - createdAt
                        - isEdited
                        properties:
                          activityId:
                            type: integer
                            description: an integer
                            title: int
                          entryType:
                            $ref: '#/components/schemas/ActivityLogEntryType'
                          commentId:
                            anyOf:
                            - type: integer
                              description: an integer
                              title: int
                            - type: 'null'
                          visibilityScope:
                            $ref: '#/components/schemas/VisibilityScope'
                          body:
                            anyOf:
                            - type: object
                              required:
                              - html
                              properties:
                                html:
                                  type: string
                              additionalProperties: false
                            - type: 'null'
                          author:
                            type: object
                            required:
                            - userId
                            - displayName
                            properties:
                              userId:
                                type: string
                                description: a Universally Unique Identifier
                                format: uuid
                                pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                              displayName:
                                type: string
                            additionalProperties: false
                          attachments:
                            type: array
                            items:
                              type: object
                              required:
                              - id
                              - fileName
                              - mimeType
                              - sizeBytes
                              - downloadPath
                              properties:
                                id:
                                  type: integer
                                  description: an integer
                                  title: int
                                fileName:
                                  type: string
                                mimeType:
                                  type: string
                                sizeBytes:
                                  type: number
                                downloadPath:
                                  type: string
                              additionalProperties: false
                          createdAt:
                            type: string
                          isEdited:
                            type: boolean
                          logMessage:
                            anyOf:
                            - type: string
                            - type: 'null'
                        additionalProperties: false
                    additionalProperties: false
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '401':
          description: AuthError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '403':
          description: Receipt action forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '404':
          description: EntityNotFoundError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '409':
          description: Attachment invalid state
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '422':
          description: Comment is empty
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '500':
          description: InfrastructureError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
      description: Creates a text-only comment, attachment-only entry, or mixed comment+attachments on a receipt. Allowed only while the receipt is in Draft or Submitted status. All writes are transactional. Mentions are extracted from body_html.
      summary: Create a comment or attachment-only entry
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                body:
                  anyOf:
                  - type: object
                    required:
                    - html
                    properties:
                      html:
                        type: string
                        description: a string at most 51200 character(s) long
                        title: maxLength(51200)
                        maxLength: 51200
                    additionalProperties: false
                  - type: 'null'
                visibilityScope:
                  $ref: '#/components/schemas/VisibilityScope'
                attachmentIds:
                  type: array
                  items:
                    type: integer
                    description: an integer
                    title: int
                  description: an array of at most 100 item(s)
                  title: maxItems(100)
                  maxItems: 100
              additionalProperties: false
        required: true
  /api/v1/entities/{entityId}/receipts/{id}/comments/{commentId}:
    patch:
      tags:
      - receiptComments
      operationId: receiptComments.editComment
      parameters:
      - name: entityId
        in: path
        schema:
          type: string
          description: The UUID of the Platform entity
          default: 04eb277c-f9cd-42b0-9610-0f068f6aaea1
        required: true
        description: The UUID of the Platform entity
      - name: id
        in: path
        schema:
          type: string
          description: a string to be decoded into a number
        required: true
        description: a string to be decoded into a number
      - name: commentId
        in: path
        schema:
          type: string
          description: a string to be decoded into a number
        required: true
        description: a string to be decoded into a number
      security:
      - platformApiKey: []
      - platformBearerToken: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - activity
                    properties:
                      activity:
                        type: object
                        required:
                        - activityId
                        - entryType
                        - commentId
                        - visibilityScope
                        - body
                        - author
                        - attachments
                        - createdAt
                        - isEdited
                        properties:
                          activityId:
                            type: integer
                            description: an integer
                            title: int
                          entryType:
                            $ref: '#/components/schemas/ActivityLogEntryType'
                          commentId:
                            anyOf:
                            - type: integer
                              description: an integer
                              title: int
                            - type: 'null'
                          visibilityScope:
                            $ref: '#/components/schemas/VisibilityScope'
                          body:
                            anyOf:
                            - type: object
                              required:
                              - html
                              properties:
                                html:
                                  type: string
                              additionalProperties: false
                            - type: 'null'
                          author:
                            type: object
                            required:
                            - userId
                            - displayName
                            properties:
                              userId:
                                type: string
                                description: a Universally Unique Identifier
                                format: uuid
                                pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                              displayName:
                                type: string
                            additionalProperties: false
                          attachments:
                            type: array
                            items:
                              type: object
                              required:
                              - id
                              - fileName
                              - mimeType
                              - sizeBytes
                              - downloadPath
                              properties:
                                id:
                                  type: integer
                                  description: an integer
                                  title: int
                                fileName:
                                  type: string
                                mimeType:
                                  type: string
                                sizeBytes:
                                  type: number
                                downloadPath:
                                  type: string
                              additionalProperties: false
                          createdAt:
                            type: string
                          isEdited:
                            type: boolean
                          logMessage:
                            anyOf:
                            - type: string
                            - type: 'null'
                        additionalProperties: false
                    additionalProperties: false
                additionalProperties: false
        '400':
          description: The request did not match the expected schema
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '401':
          description: AuthError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '403':
          description: Comment action forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                      - parameter
                      - detail
                required:
                - status
                - code
                - detail
        '404':
          description: EntityNotFoundError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 400
                  code:
                    type: string
                    description: Error code identifier
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Field-specific validation errors
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Field path that failed validation
                          example: status
                        detail:
                          type: string
                          description: Specific validation error message
                          example: Expected one of ["Draft", "Submitted", "Cancelled"], received "Draft112"
                        code:
                          type: string
                          description: Optional error code
                          example: INVALID_ENUM_VALUE
                        data:
                          type: object
                          description: Optional additional error context
                          additionalProperties: true
                      required:
                    

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/opengov/refs/heads/main/openapi/opengov-receiptcomments-api-openapi.yml