OpenGov Receipt Surface Versions API
The receiptSurfaceVersions API from OpenGov — 1 operation(s) for receiptsurfaceversions.
The receiptSurfaceVersions API from OpenGov — 1 operation(s) for receiptsurfaceversions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/opengov:opengov-receiptsurfaceversions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OpenGov Receipt Receipt Surface Versions 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: receiptSurfaceVersions
paths:
/api/v1/entities/{entityId}/receipts/{id}/surface-versions:
get:
tags:
- receiptSurfaceVersions
operationId: receiptSurfaceVersions.listVersions
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: surfaces
in: query
schema:
type: string
required: false
security:
- platformApiKey: []
- platformBearerToken: []
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
required:
- data
- meta
properties:
data:
type: object
required:
- versions
properties:
versions:
type: array
items:
type: object
required:
- surface
- maxEntryId
- lastViewedEntryId
- entryCount
- isNewer
properties:
surface:
$ref: '#/components/schemas/SurfaceType'
maxEntryId:
type: integer
description: an integer
title: int
lastViewedEntryId:
anyOf:
- type: integer
description: an integer
title: int
- type: 'null'
entryCount:
type: integer
description: an integer
title: int
isNewer:
type: boolean
additionalProperties: false
additionalProperties: false
meta:
type: object
required:
- receiptId
properties:
receiptId:
type: integer
description: an integer
title: int
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 permission denied
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 current max entry IDs for each surface (COMMENTS, ATTACHMENTS, ACTIVITY_LOG) and the user's last-viewed entry ID for each. Frontend uses the `isNewer` flag to render the 'New' badge. Called on side-panel mount.
summary: Get surface version status for a receipt
post:
tags:
- receiptSurfaceVersions
operationId: receiptSurfaceVersions.recordSurfaceViews
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:
'204':
description: Success
'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 permission denied
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: Body is an array of `{ surface, lastViewedEntryId }` pairs. Backend upserts rcp_user_surface_views records and bumps `viewed_count`. Returns 204 No Content. Called when the user opens a panel.
summary: Record surface views (mark up to entry IDs as seen)
requestBody:
content:
application/json:
schema:
type: array
items:
type: object
required:
- surface
- lastViewedEntryId
properties:
surface:
$ref: '#/components/schemas/SurfaceType'
lastViewedEntryId:
type: integer
description: an integer
title: int
additionalProperties: false
required: true
components:
schemas:
SurfaceType:
type: string
enum:
- COMMENTS
- ATTACHMENTS
- ACTIVITY_LOG
description: Type of surface to track versions for
title: Surface type
securitySchemes:
platformApiKey:
description: OpenGov Platform API Key
type: apiKey
name: Authorization
in: header
platformBearerToken:
type: http
scheme: bearer