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

# Update a purchase order

> Updates a purchase order with the information provided. The existing product quantities and details will be overridden with the information provided. The update is forbidden if the Purchase Order is already associated to a shipment.



## OpenAPI

````yaml /openapi.json patch /v1/purchaseOrders
openapi: 3.1.0
info:
  title: OVRSEA API
  version: 1.3.2
servers:
  - url: https://api.cf.ovrsea.com
security: []
paths:
  /v1/purchaseOrders:
    patch:
      tags:
        - Purchase Orders
      summary: Update a purchase order
      description: >-
        Updates a purchase order with the information provided. The existing
        product quantities and details will be overridden with the information
        provided. The update is forbidden if the Purchase Order is already
        associated to a shipment.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                product_lines:
                  items:
                    properties:
                      ordered_quantity:
                        example: 24
                        type: number
                      product:
                        $ref: '#/components/schemas/Product'
                      reference:
                        example: 'Delivery #1'
                        type: string
                      unit_price:
                        $ref: '#/components/schemas/Price'
                      volume:
                        example: 15
                        type: number
                      volume_unit:
                        type: string
                        example: m3
                    required:
                      - product
                      - ordered_quantity
                    type: object
                  type: array
                reference:
                  type: string
                  example: PO5792303
              required:
                - reference
                - product_lines
              type: object
        required: true
      responses:
        '201':
          description: Purchase order updated
          content:
            application/json:
              schema:
                description: Purchase order updated
                properties:
                  reference:
                    type: string
                type: object
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Bad request
                type: object
components:
  schemas:
    Product:
      type: object
      required:
        - sku
      modelName: Product
      properties:
        sku:
          type: string
          example: REF0123458
        hs_code:
          type: string
          example: '96032930'
        description:
          type: string
          example: blue shirt with a T shape
        is_hazardous:
          type: boolean
          default: 'false'
        hazardous_description:
          type: string
          example: UN1993
        custom_parameters:
          type: array
          description: Array of up to 3 custom parameters
          items:
            type: object
            properties:
              name:
                type: string
                example: parameter1
              value:
                type: string
                example: value1
    Price:
      modelName: Price
      type: object
      properties:
        amount:
          type: number
          format: float
          example: 150357.99
        currency:
          type: string
          enum:
            - AED
            - AUD
            - BHD
            - BRL
            - CAD
            - CHF
            - CNY
            - DKK
            - EUR
            - GBP
            - HKD
            - IDR
            - INR
            - JPY
            - MXN
            - KRW
            - KWD
            - MYR
            - NOK
            - NZD
            - PLN
            - SEK
            - SGD
            - THB
            - TND
            - TWD
            - USD
            - XOF
            - XPF
            - ZAR
          example: USD

````