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

# Create Purchase Orders

Use this endpoint to create a new purchase order and associate it with an existing product in your PIC library. Purchase orders track sourcing records and enable Scope 3 impact calculations.

Purchases can optionally be linked to a Tier 1 FEM assessment by providing the assessment identifier in the `purchaseOrder.assembly.femId` field.

<Card title="PIC - Create a Purchase Order" href="/recipes/pic-add-po-to-product" />

### Request body params

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

### Implementation Details

* **Product association**: The purchase order is added to the specified product. The product must exist and belong to your account.
* **FEM linking constraints**: Products imported from the Higg Product Module cannot be linked to a FEM. This endpoint only accepts `purchaseOrder.assembly.femId` for FEM linking; any flags such as `isDefault` are derived by the server and may appear only in responses.
* **Date format**: The expected format for `purchaseDate` is `YYYY-MM-DD`. The field is a plain string in the API contract.


## OpenAPI

````yaml api-reference/openapi/french-eco.json POST /purchase-orders/create
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/create:
    post:
      summary: Create Purchase Orders
      operationId: CreatePurchaseOrders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorpRepApiCreatePurchaseOrderRequest'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpRepApiCreatePurchaseOrderResponse'
components:
  schemas:
    CorpRepApiCreatePurchaseOrderRequest:
      properties:
        productId:
          type: string
        purchaseOrder:
          $ref: '#/components/schemas/CorpRepApiPurchaseOrderData'
      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
    CorpRepApiPurchaseOrderData:
      properties:
        purchaseOrderId:
          type: string
          nullable: true
        purchaseDate:
          type: string
          nullable: true
        amountPurchase:
          type: number
          format: double
          nullable: true
        assembly:
          $ref: '#/components/schemas/AssemblyType'
      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

````