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

# PIC - Create Product with French Eco-Score Optional Fields

> This recipe shows how to create a product with optional durability fields that refine the French Eco-Score calculation.

```bash theme={null}
curl --request POST \
     --url https://api-v2.production.higg.org/pic-api/v1/products/create \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: <<apiKey>>' \
     --header 'x-developer-request-token: <<apiKey>>' \
     --data '{
        "name": "Eco Linen Shirt",
        "weight": 0.35,
        "weightMeasureUnit": "kilograms",
        "weightIsPrimaryData": true,
        "categoryExpansionId": "ApparelAccessories-TopsBlouses-ButtonFrontShirts",
        "size": "Adult",
        "materials": [
          {
            "netUse": 75,
            "materialId": "MatTX0001",
            "composition": 100
          }
        ],
        "frenchLabelCountry": {
          "code": "FR",
          "name": "France"
        },
        "frenchLabelDyeingCountry": {
          "code": "FR",
          "name": "France"
        },
        "frenchLabelFabricCountry": {
          "code": "FR",
          "name": "France"
        },
        "frenchLabelOptionalFields": {
          "business": "small-business",
          "countrySpinning": {
            "code": "CN",
            "name": "China"
          },
          "numberOfReferences": 150,
          "price": 45,
          "upcycled": false
        }
     }'
```

```json theme={null}
{"success":true}
```

<Steps>
  <Step title="Set the required French Eco-Score fields">
    Before adding optional fields, make sure the product includes all mandatory French Eco-Score fields:

    * `weightIsPrimaryData` set to `true`
    * `frenchLabelCountry` — final assembly location
    * `frenchLabelDyeingCountry` — finishing location
    * `frenchLabelFabricCountry` — textile formation location

    See the [French Eco-Score requirements](/api-reference/pic/french-eco-scores/overview) for details.

    ```json theme={null}
    "weightIsPrimaryData": true,
    "frenchLabelCountry": { "code": "FR", "name": "France" },
    "frenchLabelDyeingCountry": { "code": "FR", "name": "France" },
    "frenchLabelFabricCountry": { "code": "FR", "name": "France" }
    ```
  </Step>

  <Step title="Set the business type">
    ### field: business

    Field type: string (enum)

    Indicates the business type and whether repair services are offered.

    * `small-business`
    * `large-business-with-services`
    * `large-business-without-services`

    ```json theme={null}
    "frenchLabelOptionalFields": {
      "business": "small-business"
    }
    ```
  </Step>

  <Step title="Set the spinning country">
    ### object: countrySpinning

    Uses the same country code and name format as the other location fields. Retrieve valid values from the [Get Manufacturing Countries](/api-reference/pic/french-eco-scores/get-manufacturing-countries) endpoint.

    #### field: code

    Set the 2-letter abbreviation for the country of spinning.

    #### field: name

    Set the full name of the country of spinning in English.

    ```json theme={null}
    "frenchLabelOptionalFields": {
      "countrySpinning": {
        "code": "CN",
        "name": "China"
      }
    }
    ```
  </Step>

  <Step title="Set the number of references">
    ### field: numberOfReferences

    Field type: number

    The number of references in the brand catalogue.

    * Min: `1`
    * Max: `999999`

    ```json theme={null}
    "frenchLabelOptionalFields": {
      "numberOfReferences": 150
    }
    ```
  </Step>

  <Step title="Set the price">
    ### field: price

    Field type: number

    The product price in euros (EUR).

    * Min: `1`
    * Max: `1000`

    ```json theme={null}
    "frenchLabelOptionalFields": {
      "price": 45
    }
    ```
  </Step>

  <Step title="Set the upcycled flag">
    ### field: upcycled

    Field type: boolean

    Indicates whether the product is remanufactured.

    ```json theme={null}
    "frenchLabelOptionalFields": {
      "upcycled": false
    }
    ```
  </Step>
</Steps>
