Workday Finance Purchase Orders API

Purchase order creation and management

OpenAPI Specification

workday-finance-purchase-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Workday Finance Financial Management Accounts Purchase Orders API
  description: Core API for financial management operations including general ledger, accounts payable, accounts receivable, financial reporting, tax management, financial organizations, and worktag management. Exposes data relative to accounts, accounting, business plans, and related financial structures.
  version: v41.2
  contact:
    name: Workday API Support
    email: api-support@workday.com
  termsOfService: https://www.workday.com/en-us/legal.html
servers:
- url: https://wd2-impl-services1.workday.com/ccx/api/financial-management/v41.2/{tenant}
  description: Workday Financial Management API Server
  variables:
    tenant:
      default: mycompany
      description: Workday tenant name
security:
- bearerAuth: []
tags:
- name: Purchase Orders
  description: Purchase order creation and management
paths:
  /purchaseOrders:
    get:
      operationId: listPurchaseOrders
      summary: List Purchase Orders
      description: Returns a collection of purchase orders.
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: status
        in: query
        description: Filter by purchase order status
        schema:
          type: string
      responses:
        '200':
          description: Collection of purchase orders returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PurchaseOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createPurchaseOrder
      summary: Create Purchase Order
      description: Creates a new purchase order.
      tags:
      - Purchase Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderCreate'
      responses:
        '201':
          description: Purchase order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseOrder'
        '400':
          $ref: '#/components/responses/BadRequest'
  /purchaseOrders/{purchaseOrderId}:
    get:
      operationId: getPurchaseOrder
      summary: Get Purchase Order
      description: Returns details of a specific purchase order.
      tags:
      - Purchase Orders
      parameters:
      - $ref: '#/components/parameters/purchaseOrderId'
      responses:
        '200':
          description: Purchase order details returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseOrder'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    offset:
      name: offset
      in: query
      description: Number of results to skip for pagination
      schema:
        type: integer
        default: 0
    purchaseOrderId:
      name: purchaseOrderId
      in: path
      required: true
      description: The unique identifier of the purchase order
      schema:
        type: string
    limit:
      name: limit
      in: query
      description: Maximum number of results to return
      schema:
        type: integer
        default: 20
        maximum: 100
  schemas:
    PurchaseOrder:
      type: object
      properties:
        id:
          type: string
        descriptor:
          type: string
        purchaseOrderNumber:
          type: string
        status:
          type: string
          enum:
          - draft
          - submitted
          - approved
          - received
          - closed
        supplier:
          $ref: '#/components/schemas/ResourceReference'
        totalAmount:
          type: number
          format: double
        currency:
          type: string
        orderDate:
          type: string
          format: date
        lines:
          type: array
          items:
            type: object
            properties:
              lineNumber:
                type: integer
              item:
                type: string
              quantity:
                type: number
              unitCost:
                type: number
              totalCost:
                type: number
        href:
          type: string
          format: uri
    PurchaseOrderCreate:
      type: object
      required:
      - supplier
      properties:
        supplier:
          type: string
          description: Supplier identifier
        orderDate:
          type: string
          format: date
        lines:
          type: array
          items:
            type: object
            properties:
              item:
                type: string
              quantity:
                type: number
              unitCost:
                type: number
    ResourceReference:
      type: object
      properties:
        id:
          type: string
        descriptor:
          type: string
        href:
          type: string
          format: uri
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Workday Financial Management API Documentation
  url: https://community.workday.com/sites/default/files/file-hosting/productionapi/Financial_Management/v41.2/index.html