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

# Recalculate Purchase Orders

Use this endpoint to recalculate the Scope 3 impacts for one or more purchase orders.

Recalculation is useful after updating a purchase order's FEM linking, or when the underlying product data has changed.

### Request body params

| Name   | Type            | Description                                                |
| :----- | :-------------- | :--------------------------------------------------------- |
| `poId` | `Array<string>` | **\[REQUIRED]** List of purchase order IDs to recalculate. |

### Implementation Details

* **Batch processing**: Purchase orders are processed in batches — products are chunked in groups of 10, and purchase orders in groups of 30.
* **Outdated check**: The system checks whether each purchase order's linked data is outdated before recalculating. Up-to-date purchase orders may be skipped.
* **Response format**: Returns `{ successIds: string[], failureIds: string[] }`.


## OpenAPI

````yaml api-reference/openapi/french-eco.json POST /purchase-orders/recalculate
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/recalculate:
    post:
      summary: Purchase Order Recalculate
      operationId: PurchaseOrderRecalculate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorpRepApiPurchaseOrderRecalculate'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorpRepApiProductResponseRecalculate'
components:
  schemas:
    CorpRepApiPurchaseOrderRecalculate:
      properties:
        poId:
          items:
            type: string
          type: array
      required:
        - poId
      type: object
      additionalProperties: false
    CorpRepApiProductResponseRecalculate:
      properties:
        successIds:
          items:
            type: string
          type: array
        failureIds:
          items:
            type: string
          type: array
      required:
        - failureIds
        - successIds
      type: object
      additionalProperties: false
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````