OpenGov Receipts API

The receipts API from OpenGov — 9 operation(s) for receipts.

OpenAPI Specification

opengov-receipts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenGov Receipt Receipts 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: receipts
paths:
  /api/v1/entities/{entityId}/receipts:
    post:
      tags:
      - receipts
      operationId: receipts.create
      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:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - entityId
                - governmentId
                - fiscalYear
                - createdAt
                - createdBy
                - updatedAt
                - updatedBy
                - status
                - receiptNumber
                - vendorDisplayId
                - eVendorId
                - vendorName
                - lineItems
                properties:
                  id:
                    type: integer
                    description: an integer
                    title: int
                  entityId:
                    type: string
                    description: The UUID of the Platform entity
                    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}$
                  governmentId:
                    type: number
                  fiscalYear:
                    type: number
                  createdAt:
                    $ref: '#/components/schemas/DateTimeUtc'
                  createdBy:
                    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}$
                  updatedAt:
                    $ref: '#/components/schemas/DateTimeUtc'
                  updatedBy:
                    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}$
                  status:
                    type: string
                    enum:
                    - Draft
                    - Submitted
                    - Cancelled
                    - Approved
                  receiptNumber:
                    type: string
                    description: a string that will be trimmed
                  receiptDate:
                    anyOf:
                    - type: string
                      description: a string that will be trimmed
                    - type: 'null'
                  receivedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  receivingDepartment:
                    anyOf:
                    - type: string
                    - type: 'null'
                  referenceNumber:
                    anyOf:
                    - type: string
                    - type: 'null'
                  description:
                    anyOf:
                    - type: string
                      description: a string at most 2048 character(s) long
                      title: maxLength(2048)
                      maxLength: 2048
                    - type: 'null'
                  deliveryCode:
                    anyOf:
                    - type: string
                    - type: 'null'
                  deliveryCodeId:
                    anyOf:
                    - $ref: '#/components/schemas/UUID'
                    - type: 'null'
                  locationName:
                    anyOf:
                    - type: string
                    - type: 'null'
                  locationType:
                    anyOf:
                    - type: string
                    - type: 'null'
                  addressLine1:
                    anyOf:
                    - type: string
                    - type: 'null'
                  addressLine2:
                    anyOf:
                    - type: string
                    - type: 'null'
                  city:
                    anyOf:
                    - type: string
                    - type: 'null'
                  state:
                    anyOf:
                    - type: string
                    - type: 'null'
                  zip:
                    anyOf:
                    - type: string
                    - type: 'null'
                  countryCode:
                    anyOf:
                    - type: string
                    - type: 'null'
                  vendorDisplayId:
                    type: string
                  eVendorId:
                    type: number
                  vendorName:
                    type: string
                  totalReceivedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  totalAcceptedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  totalRejectedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  submittedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  submittedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  cancelledAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  cancelledBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  approvedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  approvedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  rejectedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  rejectedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  lineItems:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReceiptLineItemModel.json'
                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: Create a new receipt
      summary: Create Receipt
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - vendorDisplayId
              - eVendorId
              - vendorName
              properties:
                receiptDate:
                  anyOf:
                  - type: string
                    description: a string that will be trimmed
                  - type: 'null'
                receivedBy:
                  anyOf:
                  - 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}$
                  - type: 'null'
                receivingDepartment:
                  anyOf:
                  - type: string
                  - type: 'null'
                referenceNumber:
                  anyOf:
                  - type: string
                  - type: 'null'
                description:
                  anyOf:
                  - type: string
                    description: a string at most 2048 character(s) long
                    title: maxLength(2048)
                    maxLength: 2048
                  - type: 'null'
                deliveryCode:
                  anyOf:
                  - type: string
                  - type: 'null'
                deliveryCodeId:
                  anyOf:
                  - $ref: '#/components/schemas/UUID'
                  - type: 'null'
                locationName:
                  anyOf:
                  - type: string
                  - type: 'null'
                locationType:
                  anyOf:
                  - type: string
                  - type: 'null'
                addressLine1:
                  anyOf:
                  - type: string
                  - type: 'null'
                addressLine2:
                  anyOf:
                  - type: string
                  - type: 'null'
                city:
                  anyOf:
                  - type: string
                  - type: 'null'
                state:
                  anyOf:
                  - type: string
                  - type: 'null'
                zip:
                  anyOf:
                  - type: string
                  - type: 'null'
                countryCode:
                  anyOf:
                  - type: string
                  - type: 'null'
                vendorDisplayId:
                  type: string
                eVendorId:
                  type: number
                vendorName:
                  type: string
              additionalProperties: false
        required: true
  /api/v1/entities/{entityId}/receipts/{id}:
    get:
      tags:
      - receipts
      operationId: receipts.findById
      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:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - entityId
                - governmentId
                - fiscalYear
                - createdAt
                - createdBy
                - updatedAt
                - updatedBy
                - status
                - receiptNumber
                - vendorDisplayId
                - eVendorId
                - vendorName
                - lineItems
                properties:
                  id:
                    type: integer
                    description: an integer
                    title: int
                  entityId:
                    type: string
                    description: The UUID of the Platform entity
                    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}$
                  governmentId:
                    type: number
                  fiscalYear:
                    type: number
                  createdAt:
                    $ref: '#/components/schemas/DateTimeUtc'
                  createdBy:
                    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}$
                  updatedAt:
                    $ref: '#/components/schemas/DateTimeUtc'
                  updatedBy:
                    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}$
                  status:
                    type: string
                    enum:
                    - Draft
                    - Submitted
                    - Cancelled
                    - Approved
                  receiptNumber:
                    type: string
                    description: a string that will be trimmed
                  receiptDate:
                    anyOf:
                    - type: string
                      description: a string that will be trimmed
                    - type: 'null'
                  receivedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  receivingDepartment:
                    anyOf:
                    - type: string
                    - type: 'null'
                  referenceNumber:
                    anyOf:
                    - type: string
                    - type: 'null'
                  description:
                    anyOf:
                    - type: string
                      description: a string at most 2048 character(s) long
                      title: maxLength(2048)
                      maxLength: 2048
                    - type: 'null'
                  deliveryCode:
                    anyOf:
                    - type: string
                    - type: 'null'
                  deliveryCodeId:
                    anyOf:
                    - $ref: '#/components/schemas/UUID'
                    - type: 'null'
                  locationName:
                    anyOf:
                    - type: string
                    - type: 'null'
                  locationType:
                    anyOf:
                    - type: string
                    - type: 'null'
                  addressLine1:
                    anyOf:
                    - type: string
                    - type: 'null'
                  addressLine2:
                    anyOf:
                    - type: string
                    - type: 'null'
                  city:
                    anyOf:
                    - type: string
                    - type: 'null'
                  state:
                    anyOf:
                    - type: string
                    - type: 'null'
                  zip:
                    anyOf:
                    - type: string
                    - type: 'null'
                  countryCode:
                    anyOf:
                    - type: string
                    - type: 'null'
                  vendorDisplayId:
                    type: string
                  eVendorId:
                    type: number
                  vendorName:
                    type: string
                  totalReceivedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  totalAcceptedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  totalRejectedQuantity:
                    anyOf:
                    - $ref: '#/components/schemas/Decimal_18_5'
                    - type: 'null'
                  submittedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  submittedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  cancelledAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  cancelledBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  approvedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  approvedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  rejectedAt:
                    anyOf:
                    - type: string
                    - type: 'null'
                  rejectedBy:
                    anyOf:
                    - 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}$
                    - type: 'null'
                  lineItems:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReceiptLineItemModel.json'
                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
      

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