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

# Update Purchase Orders

Use this endpoint to update an existing purchase order. You can modify the purchase order details and FEM assembly linking.

### Request body params

| Name                            | Type     | Description                                                                                                                             |
| :------------------------------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
| `productId`                     | `string` | **\[REQUIRED]** The ID of the product the purchase order belongs to.                                                                    |
| `purchaseOrder`                 | `object` | **\[REQUIRED]** The updated purchase order data.                                                                                        |
| `purchaseOrder._id`             | `string` | **\[REQUIRED]** The internal ID of the purchase order to update.                                                                        |
| `purchaseOrder.purchaseOrderId` | `string` | Updated external purchase order identifier.                                                                                             |
| `purchaseOrder.purchaseDate`    | `string` | Updated purchase date. Expected format is `YYYY-MM-DD`; the field is a plain string in the API contract.                                |
| `purchaseOrder.amountPurchase`  | `number` | Updated quantity purchased.                                                                                                             |
| `purchaseOrder.assembly`        | `object` | Updated FEM linking data.                                                                                                               |
| `purchaseOrder.assembly.femId`  | `string` | The FEM assessment ID to link. Use [Search Tier 1 Facilities](/api-reference/pic/fem-linking/search-facilities) to find available FEMs. |

### Implementation Details

* **Partial updates**: Only the fields you provide will be updated. Omitted fields retain their existing values.
* **FEM linking constraints**: Same rules as create — products imported from the Higg Product Module cannot link to a FEM.
* **Recalculation**: After updating a purchase order, you may need to [recalculate](/api-reference/pic/purchase-orders/recalculate) to refresh its impact data.


## OpenAPI

````yaml api-reference/openapi/french-eco.json POST /purchase-orders/update
openapi: 3.0.0
info:
  title: pic-api
  version: 1.0.0
servers:
  - url: https://api-v2.production.higg.org/pic-api/v1
    description: Production
  - url: https://api-v2.demo.higg.org/pic-api/v1
    description: Demo
security:
  - sec0: []
    sec1: []
paths:
  /purchase-orders/update:
    post:
      summary: Update Purchase Orders
      operationId: UpdatePurchaseOrders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorpRepApiUpdatePurchaseOrderRequest'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpRepApiCreatePurchaseOrderResponse'
components:
  schemas:
    CorpRepApiUpdatePurchaseOrderRequest:
      description: API corp rep products
      properties:
        productId:
          type: string
        purchaseOrder:
          $ref: '#/components/schemas/PurchaseOrderTypeUpdateRequest'
      required:
        - productId
        - purchaseOrder
      type: object
      additionalProperties: false
    CorpRepApiCreatePurchaseOrderResponse:
      properties:
        productId:
          type: string
        purchaseOrder:
          items:
            $ref: '#/components/schemas/PurchaseOrder'
          type: array
        createdOn:
          type: string
      required:
        - createdOn
        - productId
        - purchaseOrder
      type: object
      additionalProperties: false
    PurchaseOrderTypeUpdateRequest:
      properties:
        _id:
          type: string
        purchaseOrderId:
          type: string
          nullable: true
        purchaseDate:
          type: string
          nullable: true
        amountPurchase:
          type: number
          format: double
          nullable: true
        assembly:
          $ref: '#/components/schemas/AssemblyType'
      required:
        - _id
      type: object
      additionalProperties: false
    PurchaseOrder:
      properties:
        _id:
          type: string
        purchaseOrderId:
          type: string
          nullable: true
        purchaseDate:
          type: number
          format: double
          nullable: true
        impactPerUnit:
          type: number
          format: double
          nullable: true
        totalImpactPerUnit:
          type: number
          format: double
          nullable: true
        pmVersion:
          type: string
          nullable: true
        msiVersion:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
        amountPurchase:
          type: number
          format: double
          nullable: true
        isOutdated:
          type: boolean
          nullable: true
        impactsPerUnitMultiPack:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        totalImpactsMultiPack:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        impactsPerUnit:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        totalImpacts:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        assembly:
          $ref: '#/components/schemas/AssemblyRef'
      required:
        - _id
        - assembly
      type: object
      additionalProperties: false
    AssemblyType:
      properties:
        femId:
          type: string
          nullable: true
      type: object
      additionalProperties: false
    CorpRepPurchaseOrderImpacts:
      description: corpRep weight information
      properties:
        componentImpact:
          type: number
          format: double
          description: Components Impact
          nullable: true
        materialImpact:
          type: number
          format: double
          description: Materials Impact
        tier1Impact:
          type: number
          format: double
          description: Tier 1 (finished goods assembly processes) Impacts
        packagingImpact:
          type: number
          format: double
          description: Packaging Impacts
        logisticsImpactsUpstreamTD:
          type: number
          format: double
          description: >-
            Logistics Impacts--Category 4 - Upstream Transportation and
            Distribution
        logisticsImpactsDTImpact:
          type: number
          format: double
          description: Logistics Impacts--Category 9 - Downstream transportation
        logisticsImpactsDCImpact:
          type: number
          format: double
          description: Logistics Impacts--Category 9 - Distribution Center
        logisticsImpactsRetailImpact:
          type: number
          format: double
          description: Logistics Impacts--Category 9 - Retail
        productCareImpacts:
          type: number
          format: double
          description: Product Care Impacts--Category 11 - Use of sold products
        endOfUseImpact:
          type: number
          format: double
          description: >-
            End of Use Impacts--Category 12 - End-of-life treatment of sold
            products
        totalProductImpacts:
          type: number
          format: double
          description: Total Corporate Report Total product
      required:
        - endOfUseImpact
        - logisticsImpactsDCImpact
        - logisticsImpactsDTImpact
        - logisticsImpactsRetailImpact
        - logisticsImpactsUpstreamTD
        - materialImpact
        - packagingImpact
        - productCareImpacts
        - tier1Impact
        - totalProductImpacts
      type: object
      additionalProperties: false
    AssemblyRef:
      properties:
        isDefault:
          type: boolean
          nullable: true
        femId:
          type: string
          nullable: true
        facilityName:
          type: string
          nullable: true
        finalAssemblyRawText:
          type: string
          description: >-
            Used when finalAssembly or finalAssemblyWorldlyId is not a valid
            enum.
          nullable: true
        surveyVersion:
          type: string
          nullable: true
        finalAssemblyImpacts:
          type: number
          format: double
          nullable: true
        printingProductDyeingImpacts:
          type: number
          format: double
          nullable: true
        totalNormalizedImpacts:
          type: number
          format: double
          nullable: true
        sipfacilitytype:
          items:
            type: string
          type: array
          nullable: true
        annualProd:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        femDescriptor:
          type: string
          nullable: true
        year:
          type: number
          format: double
          nullable: true
        assessmentStatus:
          $ref: '#/components/schemas/AssessmentStatus'
        finishedProductImpacts:
          type: number
          format: double
          nullable: true
      type: object
      additionalProperties: false
    AssessmentStatus:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "assessmentStatus".
      enum:
        - NS
        - ASI
        - ASC
        - VRP
        - VRQ
        - VRE
        - VRC
        - VRD
        - VRF
        - VRI
        - ASD
      type: string
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````