OpenGov Change Order By Po API

The changeOrderByPo API from OpenGov — 10 operation(s) for changeorderbypo.

OpenAPI Specification

opengov-changeorderbypo-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenGov Purchase Order Change Order By Po API
  version: 1.0.0
  description: API for managing purchase orders, line items, splits, and vendors.
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
security:
- platformApiKey: []
- platformBearerToken: []
tags:
- name: changeOrderByPo
paths:
  /api/v1/po/entities/{entityId}/purchase-orders/{poId}/change-orders:
    post:
      tags:
      - changeOrderByPo
      operationId: changeOrderByPo.createChangeOrder
      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
      - name: poId
        in: path
        schema:
          $ref: '#/components/schemas/NumberFromString'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - changeOrder
                    properties:
                      changeOrder:
                        type: object
                        required:
                        - id
                        - entityId
                        - poPurchaseOrderId
                        - coNumber
                        - coSequence
                        - coDate
                        - status
                        - label
                        - coReasonId
                        - coReasonLabel
                        - changeDescription
                        - originalPoTotal
                        - changeInTotal
                        - revisedPoTotal
                        - currency
                        - poNumber
                        - vendorName
                        - fiscalYear
                        - nonFinancialChanges
                        - effectiveDate
                        - revisedEndDate
                        - createdBy
                        - createdAt
                        - updatedBy
                        - updatedAt
                        properties:
                          id:
                            type: number
                          entityId:
                            type: string
                          poPurchaseOrderId:
                            type: number
                          coNumber:
                            type: string
                          coSequence:
                            type: number
                          coDate:
                            type: string
                          status:
                            type: string
                          label:
                            anyOf:
                            - type: string
                            - type: 'null'
                          coReasonId:
                            anyOf:
                            - type: number
                            - type: 'null'
                          coReasonLabel:
                            anyOf:
                            - type: string
                            - type: 'null'
                          changeDescription:
                            anyOf:
                            - type: string
                            - type: 'null'
                          originalPoTotal:
                            type: string
                          changeInTotal:
                            type: string
                          revisedPoTotal:
                            type: string
                          currency:
                            type: string
                          poNumber:
                            type: string
                          vendorName:
                            anyOf:
                            - type: string
                            - type: 'null'
                          fiscalYear:
                            anyOf:
                            - type: number
                            - type: 'null'
                          nonFinancialChanges:
                            $id: /schemas/unknown
                            title: unknown
                          effectiveDate:
                            anyOf:
                            - type: string
                            - type: 'null'
                          revisedEndDate:
                            anyOf:
                            - type: string
                            - type: 'null'
                          createdBy:
                            type: string
                          createdAt:
                            type: string
                          updatedBy:
                            type: string
                          updatedAt:
                            type: string
                        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
        '409':
          description: ConflictError
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code
                    example: 409
                  code:
                    type: string
                    description: Machine-readable error code
                    example: IDEMPOTENCY_CONFLICT
                  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: A request with this idempotency key is currently being processed. Retry after the in-flight request completes.
                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: Creates a new Draft Change Order for a PO in Approved or Issued status. Auto-generates CO number and sequence. Snapshots PO financial fields. Returns 201 with Location header on success.
      summary: Create a new change order for a purchase order
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                coReasonId:
                  anyOf:
                  - type: number
                  - type: 'null'
                changeDescription:
                  anyOf:
                  - type: string
                    description: a string at most 2000 character(s) long
                    title: maxLength(2000)
                    maxLength: 2000
                  - type: 'null'
                effectiveDate:
                  anyOf:
                  - $ref: '#/components/schemas/ISODate'
                  - type: 'null'
                revisedEndDate:
                  anyOf:
                  - $ref: '#/components/schemas/ISODate'
                  - type: 'null'
                nonFinancialChanges:
                  $id: /schemas/unknown
                  title: unknown
              additionalProperties: false
        required: true
  /api/v1/po/entities/{entityId}/purchase-orders/{poId}/change-orders/{coId}:
    get:
      tags:
      - changeOrderByPo
      operationId: changeOrderByPo.getChangeOrder
      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
      - name: poId
        in: path
        schema:
          $ref: '#/components/schemas/NumberFromString'
        required: true
      - name: coId
        in: path
        schema:
          $ref: '#/components/schemas/NumberFromString'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: object
                    required:
                    - changeOrder
                    properties:
                      changeOrder:
                        type: object
                        required:
                        - id
                        - entityId
                        - poPurchaseOrderId
                        - coNumber
                        - coSequence
                        - coDate
                        - status
                        - label
                        - coReasonId
                        - coReasonLabel
                        - changeDescription
                        - originalPoTotal
                        - changeInTotal
                        - revisedPoTotal
                        - currency
                        - poNumber
                        - vendorName
                        - fiscalYear
                        - nonFinancialChanges
                        - effectiveDate
                        - revisedEndDate
                        - createdBy
                        - createdAt
                        - updatedBy
                        - updatedAt
                        - poSnapshot
                        - lines
                        - hasHeaderAttachmentChanges
                        - lineAttachmentChangesByLineId
                        properties:
                          id:
                            type: number
                          entityId:
                            type: string
                          poPurchaseOrderId:
                            type: number
                          coNumber:
                            type: string
                          coSequence:
                            type: number
                          coDate:
                            type: string
                          status:
                            type: string
                          label:
                            anyOf:
                            - type: string
                            - type: 'null'
                          coReasonId:
                            anyOf:
                            - type: number
                            - type: 'null'
                          coReasonLabel:
                            anyOf:
                            - type: string
                            - type: 'null'
                          changeDescription:
                            anyOf:
                            - type: string
                            - type: 'null'
                          originalPoTotal:
                            type: string
                          changeInTotal:
                            type: string
                          revisedPoTotal:
                            type: string
                          currency:
                            type: string
                          poNumber:
                            type: string
                          vendorName:
                            anyOf:
                            - type: string
                            - type: 'null'
                          fiscalYear:
                            anyOf:
                            - type: number
                            - type: 'null'
                          nonFinancialChanges:
                            $id: /schemas/unknown
                            title: unknown
                          effectiveDate:
                            anyOf:
                            - type: string
                            - type: 'null'
                          revisedEndDate:
                            anyOf:
                            - type: string
                            - type: 'null'
                          createdBy:
                            type: string
                          createdAt:
                            type: string
                          updatedBy:
                            type: string
                          updatedAt:
                            type: string
                          poSnapshot:
                            type: object
                            required:
                            - poNumber
                            - status
                            - description
                            - attentionTo
                            - totalAmount
                            - vendorName
                            - fiscalYear
                            - shipToAddressLine1
                            - shipToAddressLine2
                            - shipToCity
                            - shipToState
                            - shipToZip
                            - billToAddressLine1
                            - billToAddressLine2
                            - billToCity
                            - billToState
                            - billToZip
                            - billToSameAsShipTo
                            - paymentTermId
                            - paymentTermCode
                            - paymentTermDesc
                            - vendorContactName
                            - vendorContactEmail
                            - vendorContactNumber
                            - departmentId
                            - departmentName
                            properties:
                              poNumber:
                                anyOf:
                                - type: string
                                - type: 'null'
                              status:
                                anyOf:
                                - type: string
                                - type: 'null'
                              description:
                                anyOf:
                                - type: string
                                - type: 'null'
                              attentionTo:
                                anyOf:
                                - type: string
                                - type: 'null'
                              totalAmount:
                                anyOf:
                                - type: string
                                - type: 'null'
                              vendorName:
                                anyOf:
                                - type: string
                                - type: 'null'
                              fiscalYear:
                                anyOf:
                                - type: number
                                - type: 'null'
                              shipToAddressLine1:
                                anyOf:
                                - type: string
                                - type: 'null'
                              shipToAddressLine2:
                                anyOf:
                                - type: string
                                - type: 'null'
                              shipToCity:
                                anyOf:
                                - type: string
                                - type: 'null'
                              shipToState:
                                anyOf:
                                - type: string
                                - type: 'null'
                              shipToZip:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToAddressLine1:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToAddressLine2:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToCity:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToState:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToZip:
                                anyOf:
                                - type: string
                                - type: 'null'
                              billToSameAsShipTo:
                                anyOf:
                                - type: boolean
                                - type: 'null'
                              paymentTermId:
                                anyOf:
                                - type: string
                                - type: 'null'
                              paymentTermCode:
                                anyOf:
                                - type: string
                                - type: 'null'
                              paymentTermDesc:
                                anyOf:
                                - type: string
                                - type: 'null'
                              vendorContactName:
                                anyOf:
                                - type: string
                                - type: 'null'
                              vendorContactEmail:
                                anyOf:
                                - type: string
                                - type: 'null'
                              vendorContactNumber:
                                anyOf:
                                - type: string
                                - type: 'null'
                              departmentId:
                                anyOf:
                                - type: number
                                - type: 'null'
                              departmentName:
                                anyOf:
                                - type: string
                                  description: a string at most 128 character(s) long
                                  title: maxLength(128)
                                  maxLength: 128
                                - type: 'null'
                            additionalProperties: false
                          lines:
                            type: array
                            items:
                              type: object
                              required:
                              - poLineItemId
                              - lineNumber
                              - description
                              - lineItemType
                              - unitOfMeasure
                              - quantity
                              - unitRate
                              - amount
                              - changeType
                              - coLineId
                              - originalQuantity
                              - deltaQuantity
                              - originalUnitRate
                              - deltaUnitRate
                              - originalAmount
                              - changeAmount
                              - revisedLineTotal
                              - extendedAmount
                              - originalExtendedAmount
                              - taxValue
                              - taxType
                              - taxAmount
                              - discountValue
                              - discountType
                              - discountAmount
                              - freightValue
                              - freightType
                              - freightAmount
                              - miscellaneousValue
                              - miscellaneousType
                              - miscellaneousAmount
                              - toleranceAmountValue
                              - toleranceAmountType
                              - toleranceQuantityValue
                              - toleranceQuantityType
                              - toleranceUnitRateValue
                              - toleranceUnitRateType
                              - includeInThreeWayMatch
                              - includeAmountInMatch
                              - referenceNumber
                              - displayId
                              - acceptedQuantity
                              - splits
                              properties:
                                poLineItemId:
                                  anyOf:
                                  - type: number
                                  - type: 'null'
                                lineNumber:
                                  anyOf:
                                  - type: number
                                  - type: 'null'
                                description:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                lineItemType:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                unitOfMeasure:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                quantity:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                unitRate:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                amount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                changeType:
                                  anyOf:
                                  - $ref: '#/components/schemas/CoChangeType'
                                  - type: 'null'
                                coLineId:
                                  anyOf:
                                  - type: number
                                  - type: 'null'
                                originalQuantity:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                deltaQuantity:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                originalUnitRate:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                deltaUnitRate:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                originalAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                changeAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                revisedLineTotal:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                extendedAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                originalExtendedAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                taxValue:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                taxType:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                taxAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                discountValue:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                discountType:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                discountAmount:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                freightValue:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                freightType:
                                  anyOf:
                                  - type: string
                                  - type: 'null'
                                freightAmount:
                                  anyOf:
                           

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