> ## 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.

# Update an item of the shared purchase order



## OpenAPI

````yaml /openapi.yaml patch /collaboration/requests/{request_id}/purchase_order_edit/items/{id}
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:
  /collaboration/requests/{request_id}/purchase_order_edit/items/{id}:
    parameters:
      - name: request_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
    patch:
      tags:
        - Collaboration
      summary: Update an item of the shared purchase order
      operationId: collaboration_purchase_order_edit#update_item
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyCollaborationPurchaseOrderItem'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/collaboration_purchase_order'
        '404':
          description: Not found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
components:
  schemas:
    requestBodyCollaborationPurchaseOrderItem:
      type: object
      description: Only the request's item_fields are accepted.
      properties:
        description:
          type: string
          nullable: true
        unit_type:
          type: string
          nullable: true
        quantity:
          type: number
        unit_price:
          type: number
    collaboration_purchase_order:
      type: object
      description: >-
        A purchase order shared through a purchase_order_edit request, as the
        collaborator sees it.
      properties:
        label:
          type: string
        name:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - draft
            - open
            - closed
            - cancelled
            - voided
        currency:
          type: string
          nullable: true
        issued_at:
          type: string
          format: date-time
          nullable: true
        supplier_company_name:
          type: string
        supplier_contact_name:
          type: string
          nullable: true
        supplier_contact_email:
          type: string
          nullable: true
        supplier_contact_phone:
          type: string
          nullable: true
        supplier_address:
          type: string
          nullable: true
        editable:
          type: boolean
          description: False once the order is closed, cancelled or voided.
        total_amount:
          type: string
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              position:
                type: integer
              category:
                type: string
                nullable: true
              description:
                type: string
                nullable: true
              unit_type:
                type: string
                nullable: true
              quantity:
                type: string
              unit_price:
                type: string
              amount:
                type: string
        attachments:
          type: array
          description: >-
            The order's files, newest first; without `created_by_id` and
            `deleted_at`.
          items:
            allOf:
              - $ref: '#/components/schemas/attachment'
              - type: object
                properties:
                  uploaded_by_me:
                    type: boolean
                    description: >-
                      Uploaded by the signed-in collaborator — the only files
                      they can remove.
                required:
                  - uploaded_by_me
    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

````

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