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

# Search Purchase Orders

Use this endpoint to search and filter purchase orders across your PIC inventory.

### Request body params

| Name                      | Type                 | Description                                                             |
| :------------------------ | :------------------- | :---------------------------------------------------------------------- |
| `id`                      | `Array<string>`      | Filter by specific purchase order IDs.                                  |
| `name`                    | `Array<string>`      | Filter by purchase order names.                                         |
| `textSearch`              | `Array<string>`      | General text search across multiple fields.                             |
| `tags`                    | `Array<string>`      | Filter by tags.                                                         |
| `category`                | `Array<string>`      | Filter by product category.                                             |
| `productId`               | `Array<string>`      | Filter by associated product IDs.                                       |
| `purchaseOrderDateAfter`  | `string (date-time)` | Filter purchase orders after this date (e.g., `2025-01-15T00:00:00Z`).  |
| `purchaseOrderDateBefore` | `string (date-time)` | Filter purchase orders before this date (e.g., `2025-12-31T23:59:59Z`). |
| `country`                 | `Array<string>`      | Filter by country.                                                      |
| `supplier`                | `Array<string>`      | Filter by supplier.                                                     |
| `from`                    | `number`             | **\[DEFAULT: 0]** Pagination start index.                               |
| `size`                    | `number`             | **\[DEFAULT: 50]** Number of results to return (max 50).                |
| `sort`                    | `object`             | Sorting configuration `{ field: string, order: "asc" \| "desc" }`.      |

### Implementation Details

* **Pagination**: Standard pagination using `from` and `size`. Maximum page size is 50.
* **Date formatting**: Purchase dates in the response are returned as strings and, when present, typically use the `YYYY-MM-DD` representation.
* **Filtering**: Array fields act as "OR" filters — results match any of the provided values.


## OpenAPI

````yaml api-reference/openapi/french-eco.json POST /purchase-orders/search
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/search:
    post:
      summary: Purchase Orders Search
      operationId: PurchaseOrdersSearch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorpRepApiPurchaseOrdersParams'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CorpReportApiPaginatedResponseCorpRepApiPurchaseOrder
components:
  schemas:
    CorpRepApiPurchaseOrdersParams:
      properties:
        id:
          items:
            type: string
          type: array
          nullable: true
        name:
          items:
            type: string
          type: array
          nullable: true
        sort:
          $ref: '#/components/schemas/SortType'
        textSearch:
          items:
            type: string
          type: array
          nullable: true
        from:
          type: number
          format: double
          nullable: true
        size:
          type: number
          format: double
          nullable: true
        tags:
          items:
            type: string
          type: array
          nullable: true
        category:
          items:
            type: string
          type: array
          nullable: true
        productId:
          items:
            type: string
          type: array
          nullable: true
        purchaseOrderDateAfter:
          type: string
          format: date-time
          nullable: true
        purchaseOrderDateBefore:
          type: string
          format: date-time
          nullable: true
        country:
          items:
            type: string
          type: array
          nullable: true
        supplier:
          items:
            type: string
          type: array
          nullable: true
      type: object
      additionalProperties: false
    CorpReportApiPaginatedResponseCorpRepApiPurchaseOrder:
      description: API Search responses
      properties:
        from:
          type: number
          format: double
        size:
          type: number
          format: double
        total:
          type: number
          format: double
        results:
          items:
            $ref: '#/components/schemas/CorpRepApiPurchaseOrder'
          type: array
      required:
        - from
        - results
        - size
        - total
      type: object
      additionalProperties: false
    SortType:
      description: API Search requests
      properties:
        field:
          type: string
        order:
          type: string
          enum:
            - asc
            - desc
      required:
        - field
        - order
      type: object
      additionalProperties: false
    CorpRepApiPurchaseOrder:
      description: API purchase orders
      properties:
        _id:
          type: string
        purchaseOrderId:
          type: string
          nullable: true
        purchaseDate:
          type: string
          nullable: true
        amountPurchase:
          type: number
          format: double
          nullable: true
        product:
          $ref: '#/components/schemas/CorpRepProductRef'
        assembly:
          $ref: '#/components/schemas/AssemblyRef'
        createdOn:
          type: number
          format: double
        pmVersion:
          type: string
          nullable: true
        isOutdated:
          type: boolean
          nullable: true
        msiVersion:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
        impactPerUnit:
          type: number
          format: double
          nullable: true
        totalImpactPerUnit:
          type: number
          format: double
          nullable: true
        impactsPerUnit:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        totalImpacts:
          $ref: '#/components/schemas/CorpRepPurchaseOrderImpacts'
        materials:
          items:
            $ref: '#/components/schemas/CorpRepBom'
          type: array
          nullable: true
        components:
          items:
            $ref: '#/components/schemas/ComponentTaxonomyRef'
          type: array
          nullable: true
        packaging:
          items:
            $ref: '#/components/schemas/PackagingTaxonomyRef'
          type: array
          nullable: true
        weightInformation:
          $ref: '#/components/schemas/CorpRepWeightInformation'
        packagingWeight:
          $ref: '#/components/schemas/CorpRepWeightInformation'
        account:
          $ref: '#/components/schemas/AccountRef'
        modifiedBy:
          $ref: '#/components/schemas/UserRef'
        modifiedOn:
          type: number
          format: double
          nullable: true
        user:
          $ref: '#/components/schemas/UserRef'
        channelCreate:
          type: string
          nullable: true
        channelUpdate:
          type: string
          nullable: true
      required:
        - _id
        - account
        - assembly
        - createdOn
        - product
        - user
      type: object
      additionalProperties: false
    CorpRepProductRef:
      properties:
        productId:
          type: string
        category:
          type: string
          nullable: true
        categoryComplete:
          type: string
          nullable: true
        productCategoryExpansion:
          $ref: '#/components/schemas/PicProductCategoryExpansion'
        name:
          type: string
        totalImpact:
          type: number
          format: double
          nullable: true
        tags:
          $ref: '#/components/schemas/CorpRepProductTags'
      required:
        - name
        - productId
      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
    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
    CorpRepBom:
      description: corpRep product module bill of material
      properties:
        name:
          type: string
        netUse:
          type: number
          format: double
        materialId:
          type: string
        weightInformation:
          $ref: '#/components/schemas/PicMaterialWeightInformation'
        composition:
          type: number
          format: double
        isMsiMaterial:
          type: boolean
          nullable: true
        isPicMaterialLibrary:
          type: boolean
          nullable: true
        code:
          type: string
          nullable: true
        dataSource:
          type: string
          nullable: true
        isOutdated:
          type: boolean
          nullable: true
        description:
          type: string
          nullable: true
        impacts:
          $ref: '#/components/schemas/CorpRepMaterialImpacts'
      required:
        - composition
        - materialId
        - name
        - netUse
      type: object
      additionalProperties: false
    ComponentTaxonomyRef:
      properties:
        name:
          type: string
        componentId:
          type: string
        unit:
          type: number
          format: double
        weightInformation:
          $ref: '#/components/schemas/CorpRepWeightInformation'
        isMsiComponent:
          type: boolean
          nullable: true
        isOutdated:
          type: boolean
          nullable: true
        dataSource:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        impacts:
          $ref: '#/components/schemas/CorpRepMaterialImpacts'
      required:
        - componentId
        - name
        - unit
        - weightInformation
      type: object
      additionalProperties: false
    PackagingTaxonomyRef:
      properties:
        name:
          type: string
          nullable: true
        packagingId:
          type: string
        amount:
          type: number
          format: double
        weightInformation:
          $ref: '#/components/schemas/CorpRepWeightInformation'
        isMsiPackaging:
          type: boolean
          nullable: true
        isOutdated:
          type: boolean
          nullable: true
        code:
          type: string
          nullable: true
        dataSource:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        impacts:
          $ref: '#/components/schemas/CorpRepMaterialImpacts'
      required:
        - amount
        - packagingId
      type: object
      additionalProperties: false
    CorpRepWeightInformation:
      description: corpRep weight information
      properties:
        convertedToKg:
          type: number
          format: double
        weight:
          type: number
          format: double
        unit:
          $ref: '#/components/schemas/MaterialMeasureUnit'
        isPrimaryData:
          type: boolean
          description: >-
            This field is used only in product weight, Indicates if the weight
            information is primary data or is inferred from product category and
            size
          nullable: true
      required:
        - convertedToKg
        - unit
        - weight
      type: object
      additionalProperties: false
    AccountRef:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "accountRef".
      properties:
        _id:
          type: string
        name:
          type: string
        country:
          type: string
        sacId:
          type: number
          format: double
        oar_id:
          type: string
          nullable: true
        demoaccount:
          type: boolean
          nullable: true
        vbType:
          $ref: '#/components/schemas/AccountVbType'
        socialCreditId:
          type: string
          nullable: true
        taxId:
          type: string
          nullable: true
        bluesignId:
          type: string
          nullable: true
        zdhcId:
          type: string
          nullable: true
        ipeViolation:
          $ref: '#/components/schemas/IpeViolationRef'
        ffcId:
          type: number
          format: double
          nullable: true
        approvalStatus:
          $ref: '#/components/schemas/AccountApprovalStatus'
      required:
        - _id
        - country
        - name
        - sacId
      type: object
      additionalProperties: false
    UserRef:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "userRef".
      properties:
        _id:
          type: string
        email:
          type: string
        firstname:
          type: string
          nullable: true
        lastname:
          type: string
          nullable: true
      required:
        - _id
        - email
      type: object
      additionalProperties: false
    PicProductCategoryExpansion:
      description: picProduct category expansion
      properties:
        label:
          type: string
          description: The label of the PIC product category expansion
        id:
          type: string
          description: Unique identifier for the category, composed of hierarchical levels
        picCategory:
          type: string
          description: Associated PIC category for the product
        flatFileLabel:
          type: string
          description: Label used in flat file exports
        version:
          type: string
          description: The version of the PIC product category expansion
          nullable: true
        receivedOtherId:
          type: string
          description: >-
            The value received when the ID do not match no one picTaxonomy
            category.
          nullable: true
      required:
        - flatFileLabel
        - id
        - label
        - picCategory
      type: object
      additionalProperties: false
    CorpRepProductTags:
      properties: {}
      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
    PicMaterialWeightInformation:
      description: Weight information of the material in the BOM
      properties:
        convertedToKg:
          type: number
          format: double
        weight:
          type: number
          format: double
        unit:
          $ref: '#/components/schemas/MaterialMeasureUnit'
        netWeight:
          type: number
          format: double
      required:
        - convertedToKg
        - netWeight
        - unit
        - weight
      type: object
      additionalProperties: false
    CorpRepMaterialImpacts:
      description: corpRep Material Impacts
      properties:
        totalMaterialLibrary:
          type: number
          format: double
          nullable: true
        tier4Impact:
          type: number
          format: double
        tier2and3Impact:
          type: number
          format: double
        totalTierImpact:
          type: number
          format: double
          nullable: true
        uncertainty:
          properties:
            lower:
              type: number
              format: double
            upper:
              type: number
              format: double
          type: object
          nullable: true
      required:
        - tier2and3Impact
        - tier4Impact
      type: object
      additionalProperties:
        additionalProperties: true
    MaterialMeasureUnit:
      enum:
        - kilograms
        - grams
        - milligram
        - pound
        - ounce
      type: string
    AccountVbType:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "accountVbType".
      enum:
        - None
        - 2nd Party
        - 3rd Party
      type: string
    IpeViolationRef:
      properties:
        totalViolations:
          type: number
          format: double
      required:
        - totalViolations
      type: object
      additionalProperties: false
    AccountApprovalStatus:
      enum:
        - Approved
        - Declined
        - New
      type: string
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````