> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getspecs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List purchase order revisions

> Revisions of an issued purchase order, newest first, without snapshots.



## OpenAPI

````yaml /openapi.yaml get /purchase_orders/{purchase_order_id}/revisions
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /purchase_orders/{purchase_order_id}/revisions:
    get:
      tags:
        - PurchaseOrderRevision
      summary: List purchase order revisions
      description: Revisions of an issued purchase order, newest first, without snapshots.
      operationId: purchase_order_revisions#index
      parameters:
        - name: purchase_order_id
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/purchase_order_revision'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    purchase_order_revision:
      type: object
      properties:
        id:
          type: integer
        purchase_order_id:
          type: integer
        revision:
          type: integer
          description: 0 = as issued.
        created_by_id:
          type: integer
          nullable: true
        collaboration_request:
          type: object
          nullable: true
          description: >-
            Set when a collaborator (created_by_id) made the change through a
            purchase_order_edit request.
          properties:
            id:
              type: integer
            name:
              type: string
        created_at:
          type: string
          format: date-time
        snapshot:
          type: object
          description: >-
            Only on the single-revision endpoint. Full copy of the PO header and
            all of its items (every non-system column, including each item's
            `project_id`) at this revision, under `items`.
          additionalProperties: true
        attachments:
          type: array
          description: >-
            Only on the single-revision endpoint. The order's files at this
            revision (`snapshot.attachments`), with a signed `url` — files
            removed since then are included, with `deleted_at` set.
          items:
            $ref: '#/components/schemas/attachment'
      required:
        - id
        - revision
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
    attachment:
      type: object
      description: >-
        A file attached to a procurement document (purchase order, supplier
        invoice, goods receipt or inspection), a project or a baseline row.
      properties:
        id:
          type: integer
        filename:
          type: string
          description: The name the file was uploaded with.
        content_type:
          type: string
          example: application/pdf
        byte_size:
          type: integer
        url:
          type: string
          description: >-
            Download URL. On private storage a signed URL that serves the file
            inline under its filename.
        created_by_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When it was removed from its document. Documents list only files
            that are not removed; a purchase order revision lists the files it
            had, removed ones included (their `url` still works).
      required:
        - id
        - filename
        - content_type
        - byte_size
        - url
        - created_at
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.