openapi: 3.2.0 info: title: OpenGov Purchase Order 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: Purchase Order paths: /api/v1/po/entities/{entityId}/purchase-orders/{id}: get: tags: - Purchase Order operationId: purchaseOrder.findById 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: id in: path schema: $ref: '#/components/schemas/NumberFromString' required: true - name: revision in: query schema: $ref: '#/components/schemas/PoRevisionParam' required: false responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: object required: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Retrieve a purchase order by ID with vendor, line items, and splits. Pass `?revision=N` to return a historical snapshot rebuilt from po_revision_history. When omitted, the current PO is returned. When `revision` matches the current PO revision, the current PO is returned (no snapshot lookup). When `revision=0` and the PO has no revision history, the current PO is returned. Otherwise a missing snapshot row produces 404 PoRevisionNotFoundError. summary: Find Purchase Order by ID put: tags: - Purchase Order operationId: purchaseOrder.update 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Update purchase order header fields. Returns 409 Conflict if PO is not in Draft status. summary: Update Purchase Order requestBody: content: application/json: schema: $ref: '#/components/schemas/PurchaseOrderModel.jsonUpdate' required: true delete: tags: - Purchase Order operationId: purchaseOrder.delete 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: id in: path schema: $ref: '#/components/schemas/NumberFromString' required: true 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: 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: Soft-delete a Purchase Order in Draft status. Cascade soft-deletes all associated line items and account splits in a single atomic transaction. Only the creator can delete. Vendor records are NOT affected. Returns 204 No Content on success. summary: Delete a Draft Purchase Order /api/v1/po/entities/{entityId}/purchase-orders: post: tags: - Purchase Order operationId: purchaseOrder.create 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: '201': description: Success content: application/json: schema: type: object required: - data properties: data: type: object required: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Create a new purchase order in Draft status (100). poType is required; all other header fields are optional. The system auto-generates a unique PO number. Returns 201 with Location header. summary: Create a Draft Purchase Order requestBody: content: application/json: schema: type: object required: - poType - source properties: poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean orgUnitUuid: 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' vendor: anyOf: - $ref: '#/components/schemas/VendorApiCreate' - type: 'null' terms: type: object required: - bodyHtml properties: bodyHtml: type: string additionalProperties: false additionalProperties: false required: true /api/v1/po/entities/{entityId}/purchase-orders/search: post: tags: - Purchase Order operationId: purchaseOrder.search 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 - meta properties: data: type: object required: - purchaseOrders properties: purchaseOrders: type: array items: type: object required: - id - govId - poNumber - status - poType - createdAt - updatedAt properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' createdAt: $ref: '#/components/schemas/DateTimeUtc' updatedAt: $ref: '#/components/schemas/DateTimeUtc' hasPendingCo: type: boolean revision: type: number 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 additionalProperties: false meta: type: object required: - nextCursor - prevCursor - count properties: nextCursor: anyOf: - type: string - type: 'null' prevCursor: anyOf: - type: string - type: 'null' count: 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: 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: 'Search purchase orders with optional filters: status, eVendorId, searchTerm (poNumber/description). Cursor-based pagination.' summary: Search Purchase Orders requestBody: content: application/json: schema: type: object required: [] properties: status: type: array items: $ref: '#/components/schemas/PoStatus' eVendorId: anyOf: - type: number - type: 'null' searchTerm: anyOf: - type: string - type: 'null' pagination: type: object required: [] properties: cursor: type: string pageSize: type: number additionalProperties: false additionalProperties: false required: true /api/v1/po/entities/{entityId}/purchase-orders/department-po-count: post: tags: - Purchase Order operationId: purchaseOrder.departmentPoCount 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: - count properties: count: 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: 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 the count of non-deleted Purchase Orders in any status other than Draft that are associated with the given departmentId for the entity. summary: Count Non-Draft Purchase Orders by Department requestBody: content: application/json: schema: type: object required: - departmentId properties: departmentId: type: number additionalProperties: false required: true /api/v1/po/entities/{entityId}/purchase-orders/{id}/submit: post: tags: - Purchase Order operationId: purchaseOrder.submit 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: 'Submit a Draft Purchase Order. All types (Standard, Blanket, Emergency) transition Draft to PendingApproval and publish a Kafka submitted event for downstream approval workflows. Validates: vendor assigned, at least 1 line item, all line items have splits. Pass dryRun: true to run all checks and persist results as operation errors without transitioning.' summary: Submit Purchase Order for Approval requestBody: content: application/json: schema: type: object required: [] properties: dryRun: type: boolean additionalProperties: false required: true /api/v1/po/entities/{entityId}/purchase-orders/{id}/approve: post: tags: - Purchase Order operationId: purchaseOrder.approve 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false additionalProperties: false additionalProperties: false warnings: type: array items: type: object required: - code - detail properties: code: type: string enum: - ENCUMBRANCE_FAILED - AUTO_ISSUE_FAILED detail: type: string data: type: object required: [] properties: {} additionalProperties: $id: /schemas/unknown title: unknown 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: Approve a Purchase Order. Transitions PendingApproval to Approved. When the entity admin setting `autoIssueOnPromotion` is true, the PO is also transitioned to Issued — requires PO_APPROVER and PO_ISSUER claims. If issue fails after approval commits, the PO remains Approved and a non-fatal `AUTO_ISSUE_FAILED` warning is returned (HTTP 200 + warnings array). summary: Approve Purchase Order /api/v1/po/entities/{entityId}/purchase-orders/{id}/reject: post: tags: - Purchase Order operationId: purchaseOrder.reject 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Reject a pending Purchase Order back to Draft for revision. Transitions status from PendingApproval to Draft and sets label to 'Rejected'. summary: Reject Purchase Order /api/v1/po/entities/{entityId}/purchase-orders/{id}/issue: post: tags: - Purchase Order operationId: purchaseOrder.issue 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Issue an approved Purchase Order to the vendor. Transitions status from Approved to Issued. summary: Issue Purchase Order /api/v1/po/entities/{entityId}/purchase-orders/{id}/cancel: post: tags: - Purchase Order operationId: purchaseOrder.cancel 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Cancel a Purchase Order. Allowed from PendingApproval, Approved, or Issued status. Transitions to Cancelled (terminal state). summary: Cancel Purchase Order /api/v1/po/entities/{entityId}/purchase-orders/{id}/close: post: tags: - Purchase Order operationId: purchaseOrder.close 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Manually close an Issued Purchase Order. Transitions status from Issued to Closed and sets label to 'Manually Closed'. summary: Close Purchase Order /api/v1/po/entities/{entityId}/purchase-orders/bulk: post: tags: - Purchase Order operationId: purchaseOrder.bulkCreateApproved 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: '201': description: Success content: application/json: schema: type: object required: - data properties: data: type: object required: - purchaseOrders properties: purchaseOrders: type: array items: type: object required: - poNumber - status - poId - dateCreated properties: poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' issuedAt: anyOf: - type: string - type: 'null' poId: type: number dateCreated: type: string additionalProperties: false additionalProperties: false warnings: type: array items: type: object required: - code - detail properties: code: type: string enum: - ENCUMBRANCE_FAILED - AUTO_ISSUE_FAILED detail: type: string data: type: object required: [] properties: {} additionalProperties: $id: /schemas/unknown title: unknown 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: 'Create N purchase orders from an approved Purchase Request. Validation and budget checks are hard gates: if any fails, zero POs are created. POs are first created in Draft and committed, then encumbrance is booked and they are promoted to Approved. If encumbrance booking fails, the POs are left in Draft (label Errored) and a non-fatal `ENCUMBRANCE_FAILED` entry is returned in the top-level `warnings` array (HTTP 201) rather than failing the request; the caller must cancel/delete those Draft POs before re-submitting the same PR (a re-submit returns 409 DUPLICATE_PURCHASE_REQUEST while they exist). When the entity admin setting `autoIssueOnPromotion` is true, approved POs are also transitioned to Issued — requires PO_CREATOR and PO_ISSUER claims. If issue fails after approval commits, the POs remain Approved and a non-fatal `AUTO_ISSUE_FAILED` warning is returned. The response `status` field reflects the final PO status (Draft, Approved, or Issued).' summary: Bulk Create Approved Purchase Orders requestBody: content: application/json: schema: type: object required: - source - purchaseRequestId - purchaseRequestNumber - purchaseOrders properties: source: $ref: '#/components/schemas/PoSource' purchaseRequestId: type: number purchaseRequestNumber: type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 prAmount: $ref: '#/components/schemas/Decimal_18_2' purchaseOrders: type: array minItems: 1 items: type: object required: - poType - vendor - lineItems properties: poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean orgUnitUuid: 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' vendor: $ref: '#/components/schemas/VendorModel.jsonCreate' lineItems: type: array minItems: 1 items: type: object required: - lineItemType - lineItemSplits properties: lineItemType: $ref: '#/components/schemas/LineItemType' description: anyOf: - type: string description: a string at most 2048 character(s) long title: maxLength(2048) maxLength: 2048 - type: 'null' quantity: anyOf: - $ref: '#/components/schemas/Decimal_11_5' - type: 'null' unitOfMeasure: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' unitRate: anyOf: - $ref: '#/components/schemas/Decimal_13_5' - type: 'null' referenceNumber: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' toleranceAmountValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' toleranceAmountType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' toleranceQuantityValue: anyOf: - $ref: '#/components/schemas/Decimal_18_5' - type: 'null' toleranceQuantityType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' toleranceUnitRateValue: anyOf: - $ref: '#/components/schemas/Decimal_13_5' - type: 'null' toleranceUnitRateType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' taxValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' taxType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' discountValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' discountType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' freightValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' freightType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' miscellaneousValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' miscellaneousType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' includeInThreeWayMatch: type: boolean includeAmountInMatch: type: boolean lineItemSplits: type: array minItems: 1 items: $ref: '#/components/schemas/LineItemSplitModel.jsonCreate' additionalProperties: false attachments: type: array items: type: object required: - sourceUrl - fileName properties: sourceUrl: type: string description: a string at most 2048 character(s) long title: maxLength(2048) maxLength: 2048 fileName: type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 additionalProperties: false description: an array of at most 50 item(s) title: maxItems(50) maxItems: 50 comments: anyOf: - type: string description: a string at most 51200 character(s) long title: maxLength(51200) maxLength: 51200 - type: 'null' termsAndConditions: type: object required: [] properties: bodyHtml: anyOf: - type: string - type: 'null' termsAttachments: type: array items: type: object required: - sourceUrl - fileName properties: sourceUrl: type: string description: a string at most 2048 character(s) long title: maxLength(2048) maxLength: 2048 fileName: type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 additionalProperties: false description: an array of at most 5 item(s) title: maxItems(5) maxItems: 5 additionalProperties: false additionalProperties: false additionalProperties: false required: true /api/v1/po/entities/{entityId}/purchase-orders/{id}/clear-tolerances: post: tags: - Purchase Order operationId: purchaseOrder.clearTolerances 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Removes all tolerance and over-invoicing settings from every line item on a draft PO. Used when the entity admin has disabled over-invoicing but the PO still has stale tolerance data. summary: Clear tolerance fields on a draft purchase order /api/v1/po/entities/{entityId}/purchase-orders/{id}/copy: post: tags: - Purchase Order operationId: purchaseOrder.copy 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: id 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: - purchaseOrder properties: purchaseOrder: type: object required: - id - govId - poNumber - status - poType - source - vendor - lineItems - createdAt - createdBy - updatedAt - updatedBy - organizationUnit - canInitiateChangeOrder - pendingCoId - pendingCoNumber - changeOrders properties: id: type: number govId: type: number poNumber: type: string description: a string at most 32 character(s) long title: maxLength(32) maxLength: 32 status: $ref: '#/components/schemas/PoStatus' totalAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean encumberedAmount: $ref: '#/components/schemas/Decimal_18_2' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' label: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' submittedAt: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' rejectedAt: anyOf: - type: string - type: 'null' issuedAt: anyOf: - type: string - type: 'null' cancelledAt: anyOf: - type: string - type: 'null' closedAt: 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' 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' 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' issuedBy: 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' 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' revision: type: number hasPendingCo: type: boolean orgUnitUuid: 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' hasTolerance: anyOf: - type: boolean - type: 'null' vendor: anyOf: - $ref: '#/components/schemas/VendorModel.json' - type: 'null' lineItems: type: array items: anyOf: - $ref: '#/components/schemas/LineItemModel.json' - type: 'null' 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}$ organizationUnit: anyOf: - type: object required: - id - uuid - name properties: id: anyOf: - type: number - $ref: '#/components/schemas/NumberFromString' uuid: 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}$ name: type: string code: anyOf: - anyOf: - type: string - type: number - type: 'null' description: anyOf: - type: string - type: 'null' isPrimary: type: boolean active: type: boolean additionalProperties: false - type: 'null' canInitiateChangeOrder: type: boolean pendingCoId: anyOf: - type: number - type: 'null' pendingCoNumber: anyOf: - type: string - type: 'null' changeOrders: type: array items: type: object required: - id - coNumber - status - changeInTotal - approvedAt properties: id: type: number coNumber: type: string status: type: string changeInTotal: anyOf: - type: string - type: 'null' approvedAt: anyOf: - type: string - type: 'null' additionalProperties: false 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: Deep-copy an existing Purchase Order (header, line items, GL splits, selected attachments) into a new Draft PO. Comments are not copied. Supply attachmentIds to select which attachments to copy; an empty array copies none. Attachments are duplicated via S3 server-side copy; if an individual S3 copy fails the attachment row is soft-deleted and the rest of the copy succeeds. The new PO gets a fresh PO number, today's date, the current fiscal year/period, status = Draft, source = Manual. Financial tracking amounts and state-transition timestamps are reset. Copy is allowed from any source PO status. summary: Copy Purchase Order requestBody: content: application/json: schema: type: object required: [] properties: attachmentIds: type: array items: type: number additionalProperties: false required: true components: schemas: ValueOrPercent: type: string enum: - Value - Percent description: Indicates whether the input is an absolute value or a percentage title: Value or Percent Decimal_18_5: type: string title: Decimal (18,5) LineItemSplitModel.jsonCreate: type: object required: [] properties: accountNumber: anyOf: - type: string - type: 'null' accountPseudoKey: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' amount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' eProjectAccountId: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' projectAccountNumber: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' projectAccountDescription: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' reimbursable: type: boolean additionalProperties: false title: LineItemSplitModel.jsonCreate VendorModel.jsonCreate: type: object required: - eVendorId properties: eVendorId: type: number vendorDisplayId: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' name: type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 eVendorContactId: anyOf: - type: number - type: 'null' contactName: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' address: anyOf: - type: string description: a string at most 700 character(s) long title: maxLength(700) maxLength: 700 - type: 'null' contactNumber: anyOf: - type: string description: a string at most 20 character(s) long title: maxLength(20) maxLength: 20 - type: 'null' email: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' additionalProperties: false title: VendorModel.jsonCreate VendorModel.json: type: object required: - id - entityId - eVendorId - createdAt - updatedAt properties: id: type: number entityId: $ref: '#/components/schemas/UUID' eVendorId: type: number vendorDisplayId: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' name: type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 eVendorContactId: anyOf: - type: number - type: 'null' contactName: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' address: anyOf: - type: string description: a string at most 700 character(s) long title: maxLength(700) maxLength: 700 - type: 'null' contactNumber: anyOf: - type: string description: a string at most 20 character(s) long title: maxLength(20) maxLength: 20 - type: 'null' email: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' isMutable: type: boolean createdAt: $ref: '#/components/schemas/DateTimeUtc' updatedAt: $ref: '#/components/schemas/DateTimeUtc' additionalProperties: false title: VendorModel.json PurchaseOrderModel.jsonUpdate: type: object required: [] properties: poType: $ref: '#/components/schemas/PoType' poDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' fiscalYear: anyOf: - type: number - type: 'null' fiscalPeriod: anyOf: - type: number - type: 'null' description: anyOf: - type: string - type: 'null' attentionTo: anyOf: - type: string - type: 'null' referenceNumber: anyOf: - type: string - type: 'null' requiredDate: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' paymentTermId: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermCode: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' paymentTermDesc: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' periodOfConformanceFrom: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' periodOfConformanceTo: anyOf: - $ref: '#/components/schemas/ISODate' - type: 'null' requestorId: 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' purchaserId: 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' 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' source: $ref: '#/components/schemas/PoSource' purchaseRequestId: anyOf: - type: number - type: 'null' prAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' contractId: anyOf: - type: number - type: 'null' contractNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - type: 'null' purchaseRequestNumber: anyOf: - type: string description: a string at most 255 character(s) long title: maxLength(255) maxLength: 255 - 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' shipToDeliveryCode: anyOf: - type: string - type: 'null' shipToDeliveryCodeId: anyOf: - type: string - type: 'null' shipToLocationName: anyOf: - type: string - type: 'null' shipToLocationType: anyOf: - type: string - type: 'null' shipToCountryCode: 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' billToDeliveryCode: anyOf: - type: string - type: 'null' billToDeliveryCodeId: anyOf: - type: string - type: 'null' billToLocationName: anyOf: - type: string - type: 'null' billToLocationType: anyOf: - type: string - type: 'null' billToCountryCode: anyOf: - type: string - type: 'null' billToSameAsShipTo: type: boolean orgUnitUuid: 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' vendor: anyOf: - $ref: '#/components/schemas/VendorApiCreate' - type: 'null' additionalProperties: false title: PurchaseOrderModel.jsonUpdate PoRevisionParam: type: string description: a string to be decoded into a number PoStatus: type: string enum: - Draft - PendingApproval - Approved - Issued - Closed - Cancelled description: 'Purchase order status: Draft, PendingApproval, Approved, Issued, Closed, Cancelled' title: PO Status LineItemSplitModel.json: type: object required: - id - poLineItemId - createdAt - updatedAt properties: id: type: number poLineItemId: type: number accountNumber: anyOf: - type: string - type: 'null' accountPseudoKey: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' amount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' eProjectAccountId: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' projectAccountNumber: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' projectAccountDescription: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' reimbursable: type: boolean encumberedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' percentAmount: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' displayId: anyOf: - type: number - type: 'null' createdAt: $ref: '#/components/schemas/DateTimeUtc' updatedAt: $ref: '#/components/schemas/DateTimeUtc' additionalProperties: false title: LineItemSplitModel.json LineItemType: type: string enum: - Item - Service - Tax - Discount - Freight - Miscellaneous description: 'Line item type: Item, Service, Tax, Discount, Freight, Miscellaneous' title: Line Item Type ISODate: type: string description: a string matching the pattern ^\d{4}-\d{2}-\d{2}$ title: ISO Date (YYYY-MM-DD) pattern: ^\d{4}-\d{2}-\d{2}$ UUID: 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}$ DateTimeUtc: type: string description: a string to be decoded into a DateTime.Utc VendorApiCreate: type: object required: - eVendorId - name properties: eVendorId: type: number eVendorContactId: anyOf: - type: number - type: 'null' vendorDisplayId: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' name: type: string description: a string at most 256 character(s) long title: maxLength(256) minLength: 1 maxLength: 256 address: anyOf: - type: string description: a string at most 700 character(s) long title: maxLength(700) maxLength: 700 - type: 'null' contactNumber: anyOf: - type: string description: a string at most 20 character(s) long title: maxLength(20) maxLength: 20 - type: 'null' email: anyOf: - type: string description: a string at most 256 character(s) long title: maxLength(256) maxLength: 256 - type: 'null' additionalProperties: false NumberFromString: type: string description: a string to be decoded into a number PoType: type: string enum: - Standard - Blanket - Emergency description: 'Purchase order type: Standard, Blanket, Emergency' title: PO Type SignedDecimal_18_5: type: string title: Signed Decimal (18,5) Decimal_11_5: type: string title: Decimal (11,5) LineItemModel.json: type: object required: - id - poPurchaseOrderId - lineItemType - lineItemSplits - createdAt - updatedAt properties: id: type: number poPurchaseOrderId: type: number lineItemType: $ref: '#/components/schemas/LineItemType' description: anyOf: - type: string description: a string at most 2048 character(s) long title: maxLength(2048) maxLength: 2048 - type: 'null' quantity: anyOf: - $ref: '#/components/schemas/Decimal_11_5' - type: 'null' unitOfMeasure: anyOf: - type: string description: a string at most 64 character(s) long title: maxLength(64) maxLength: 64 - type: 'null' unitRate: anyOf: - $ref: '#/components/schemas/Decimal_13_5' - type: 'null' referenceNumber: anyOf: - type: string description: a string at most 50 character(s) long title: maxLength(50) maxLength: 50 - type: 'null' acceptedQuantity: $ref: '#/components/schemas/Decimal_18_5' availableAcceptedQuantity: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_5' - type: 'null' toleranceAmountValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' toleranceAmountType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' toleranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' toleranceQuantityValue: anyOf: - $ref: '#/components/schemas/Decimal_18_5' - type: 'null' toleranceQuantityType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' toleranceQuantity: anyOf: - $ref: '#/components/schemas/Decimal_18_5' - type: 'null' toleranceUnitRateValue: anyOf: - $ref: '#/components/schemas/Decimal_13_5' - type: 'null' toleranceUnitRateType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' toleranceUnitRate: anyOf: - $ref: '#/components/schemas/Decimal_13_5' - type: 'null' taxValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' taxType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' taxAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' discountValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' discountType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' discountAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' freightValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' freightType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' freightAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' miscellaneousValue: anyOf: - $ref: '#/components/schemas/Decimal_18_2' - type: 'null' miscellaneousType: anyOf: - $ref: '#/components/schemas/ValueOrPercent' - type: 'null' miscellaneousAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' includeInThreeWayMatch: type: boolean includeAmountInMatch: type: boolean extendedAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' amount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' encumberedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' matchedQuantity: $ref: '#/components/schemas/SignedDecimal_18_5' matchedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' invoicedQuantity: $ref: '#/components/schemas/SignedDecimal_18_5' invoicedAmount: $ref: '#/components/schemas/SignedDecimal_18_2' paidAmount: $ref: '#/components/schemas/SignedDecimal_18_2' encLiquidatedAccrualAmount: $ref: '#/components/schemas/SignedDecimal_18_2' availableQuantity: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_5' - type: 'null' availableAmount: $ref: '#/components/schemas/SignedDecimal_18_2' openEncumbranceAmount: anyOf: - $ref: '#/components/schemas/SignedDecimal_18_2' - type: 'null' isClosed: type: boolean closedAt: anyOf: - type: string - type: 'null' closedBy: 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' displayId: anyOf: - type: number - type: 'null' lineItemSplits: type: array items: $ref: '#/components/schemas/LineItemSplitModel.json' createdAt: $ref: '#/components/schemas/DateTimeUtc' updatedAt: $ref: '#/components/schemas/DateTimeUtc' additionalProperties: false title: LineItemModel.json PoSource: type: string enum: - PurchaseRequest - Contract - Manual description: 'Purchase order source: PurchaseRequest, Contract, Manual' title: PO Source Decimal_18_2: type: string title: Decimal (18,2) Decimal_13_5: type: string title: Decimal (13,5) SignedDecimal_18_2: type: string title: Signed Decimal (18,2) securitySchemes: platformApiKey: description: OpenGov Platform API Key type: apiKey name: Authorization in: header platformBearerToken: type: http scheme: bearer