OpenGov Attachment Limits API

The attachmentLimits API from OpenGov — 2 operation(s) for attachmentlimits.

OpenAPI Specification

opengov-attachmentlimits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Opengov Attachment Limits API
  version: 1.0.0
  description: 'Operations tagged attachmentLimits across 2 of this provider''s published API definitions: opengov-purchase-order-openapi.yml, opengov-receipt-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-purchase-order.procurement.opengov.com
  description: Production
- url: https://api-purchase-order.procurement.ogstaging.us
  description: Staging
- url: https://api-purchase-order.procurement.ogintegration.us
  description: Integration
- 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
tags:
- name: attachmentLimits
paths:
  /api/v1/po/entities/{entityId}/attachments/limits:
    servers:
    - url: https://api-purchase-order.procurement.opengov.com
      description: Production
    - url: https://api-purchase-order.procurement.ogstaging.us
      description: Staging
    - url: https://api-purchase-order.procurement.ogintegration.us
      description: Integration
    get:
      tags:
      - attachmentLimits
      operationId: attachmentLimits.getAttachmentLimits
      parameters:
      - name: entityId
        in: path
        schema:
          type: string
          description: The UUID of the Platform entity
          default: 04eb277c-f9cd-42b0-9610-0f068f6aaea1
          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}$
        required: true
        description: The UUID of the Platform entity
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - general
                    - termsAndConditions
                    properties:
                      general:
                        type: object
                        required:
                        - mimeTypes
                        - maxSizeBytes
                        - maxPerRequest
                        - maxPerPo
                        properties:
                          mimeTypes:
                            type: array
                            items:
                              type: string
                          maxSizeBytes:
                            type: number
                          maxPerRequest:
                            type: number
                          maxPerPo:
                            type: number
                        additionalProperties: false
                      termsAndConditions:
                        type: object
                        required:
                        - mimeTypes
                        - maxSizeBytes
                        - maxCount
                        properties:
                          mimeTypes:
                            type: array
                            items:
                              type: string
                          maxSizeBytes:
                            type: number
                          maxCount:
                            type: number
                        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: Machine-readable error code
                    example: ValidationError
                  detail:
                    type: string
                    description: Human-readable error description. For 400 ValidationError with exactly one field issue, matches that field's `detail`; otherwise a summary (e.g. multiple validation issues).
                    example: The request body failed validation.
                  fieldErrors:
                    type: array
                    description: Per-field validation errors (present for 400 validation errors)
                    items:
                      type: object
                      properties:
                        parameter:
                          type: string
                          description: Dot-path to the field
                          example: lineItems.0.lineItemSplits.1
                        detail:
                          type: string
                          description: Human-readable validation message
                          example: 'Account 101-5100 has insufficient budget: requested 500.00, available 200.00'
                        code:
                          type: string
                          description: Machine-readable rule identifier
                          example: BUDGET_INSUFFICIENT
                        data:
                          type: object
                          description: Structured context for the error (account codes, amounts, IDs, etc.)
                          additionalProperties: true
                          example:
                            accountNumber: 101-5100
                            accountPseudoKey: GF-101-5100
                            requestedAmount: 500
                            availableAmount: 200
                      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: 401
                  code:
                    type: string
                    description: Machine-readable error code
                    example: AuthenticationError
                  detail:
                    type: string
                    description: Human-readable error description. For 400 ValidationError with exactly one field issue, matches that field's `detail`; otherwise a summary (e.g. multiple validation issues).
                    example: Authentication is required to access this resource.
                required:
                - status
                - code
                - detail
        '403':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 403
                  code:
                    type: string
                    description: Machine-readable error code
                    example: AuthorizationError
                  detail:
                    type: string
                    description: Human-readable error description. For 400 ValidationError with exactly one field issue, matches that field's `detail`; otherwise a summary (e.g. multiple validation issues).
                    example: You do not have permission to perform this action.
                required:
                - status
                - code
                - detail
        '404':
          description: EntityNotFoundError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 404
                  code:
                    type: string
                    description: Machine-readable error code
                    example: PurchaseOrderNotFound
                  detail:
                    type: string
                    description: Human-readable error description. For 400 ValidationError with exactly one field issue, matches that field's `detail`; otherwise a summary (e.g. multiple validation issues).
                    example: Purchase order with id 123 was not found.
                required:
                - status
                - code
                - detail
        '500':
          description: InfrastructureError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 500
                  code:
                    type: string
                    description: Machine-readable error code
                    example: InternalServerError
                  detail:
                    type: string
                    description: Human-readable error description. For 400 ValidationError with exactly one field issue, matches that field's `detail`; otherwise a summary (e.g. multiple validation issues).
                    example: An unexpected error occurred while processing your request. Please try again later.
                required:
                - status
                - code
                - detail
      description: Returns purpose-grouped attachment limits (MIME allow-lists, per-file size caps, count caps). Frontend uses these to drive dropzone `accept`, size validation, and count gating without duplicating constants. `general` applies to comments and feed attachments; `termsAndConditions` is narrower (2 MB / 5 files, strict MIME set).
      summary: Get attachment upload limits
      security:
      - platformApiKey: []
      - platformBearerToken: []
  /api/v1/entities/{entityId}/attachments/limits:
    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
    get:
      tags:
      - attachmentLimits
      operationId: attachmentLimits.getAttachmentLimits
      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
      security:
      - platformApiKey: []
      - platformBearerToken: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - mimeTypes
                    - maxSizeBytes
                    - maxPerRequest
                    - maxPerReceipt
                    properties:
                      mimeTypes:
                        type: array
                        items:
                          type: string
                      maxSizeBytes:
                        type: number
                      maxPerRequest:
                        type: number
                      maxPerReceipt:
                        type: number
                    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: UnauthorizedError
          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
        '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: Returns the configured MIME allow-list, per-file size cap, per-request file count cap, and per-receipt active count cap. The frontend uses these to drive dropzone `accept`, size validation, and count gating without duplicating constants.
      summary: Get attachment upload limits
components:
  securitySchemes:
    platformApiKey:
      description: OpenGov Platform API Key
      type: apiKey
      name: Authorization
      in: header
    platformBearerToken:
      type: http
      scheme: bearer
x-refined-from:
- opengov-purchase-order-openapi.yml
- opengov-receipt-openapi.yml
x-og-spec-id: bnp-api-v1
x-og-env-servers:
  production: https://api.bnp.opengov.com
  development: https://api.bnp.ogintegration.us