# 2. Create a product

:::lead
Create the product and let it refer to the rules and parameters from the previous step.
:::

## Before you begin

Make sure that:

- You have completed [1. Create rules and parameters](/guides/fare-data/1-rules-and-parameters).
- You have the ids of the parameters the product refers to.

## What a product is

A product is what the traveller gets, for example a ticket or a supplement such as parking or a
bicycle. Each type of product is its own element with its own endpoints in the
[Products API](/apis/products-api). New types are added over time. The API reference lists the
types you can create today.

Whatever the type, a product has the same parts:

- names and descriptions that travellers see
- references, by NeTEx id, to the rules and parameters that decide when, where, for whom and on
  which conditions it can be bought and used
- references to the fare tables that price it. See [3. Set prices](/guides/fare-data/3-prices).
- settings for the type, such as when the traveller pays and which VAT group applies

So the steps are always the same:

1. Create the product with a `POST` to the endpoint for its type. Send the content and the
   references.
2. Note the `id` and the `versionId` in the response. The new version is a `DRAFT`.
3. Change the draft with `PUT` until it is right. Send the complete content each time.

## Example: create a supplement product

A supplement product (`SupplementProduct`) is sold in addition to, or independently of, a
travel ticket. The example creates a parking product:

::endpoint[products-api/createSupplementProduct]

```sh
curl --request POST \
  --url "https://api.entur.io/products/partner/v3/supplement-products" \
  --header "Authorization: Bearer <ACCESS_TOKEN>" \
  --header "ET-Client-Name: example-fare-admin" \
  --header "content-type: application/json" \
  --data '{
    "names": [
      { "lang": "nb-NO", "value": "Parkering" },
      { "lang": "en-GB", "value": "Parking" }
    ],
    "descriptions": [
      { "lang": "nb-NO", "value": "Parkering ved stasjonen." },
      { "lang": "en-GB", "value": "Parking at the station." }
    ],
    "supplementProductType": "PARKING",
    "chargingMomentType": "BEFORE_TRAVEL",
    "conditionsSummary": {
      "exchangeable": false,
      "refundable": false,
      "fareStructureType": "NETWORK_FLAT_FARE"
    },
    "vatGroup": "TRANSPORT_AND_TICKETS_VAT",
    "purchaseWindowRef": "EXA:PurchaseWindow:1b7d4c2a",
    "usageValidityPeriodRef": "EXA:UsageValidityPeriod:1day",
    "entitlementRequiredRefs": [],
    "validityParameters": [
      {
        "groupingType": "OR",
        "validityParameterType": "PARKING",
        "validityParameterRefs": ["NSR:Parking:P01"]
      }
    ]
  }'
```

The fields specific to a supplement product are:

| Field | What it does |
| --- | --- |
| `supplementProductType` | The kind of supplement, for example `PARKING`, `BICYCLE` or `SEAT_RESERVATION`. See the API reference for all values. |
| `chargingMomentType` | When the traveller pays. Only `BEFORE_TRAVEL` is supported in sales. |
| `purchaseWindowRef` | The purchase window, by NeTEx id. |
| `usageValidityPeriodRef` | The usage validity period: how long the product can be used after purchase or activation. Required before the product can be published. |
| `entitlementRequiredRefs` | What the traveller must already have. Empty if the product can be bought on its own. |
| `securityPolicy` | Optional security level for the travel document: `LOW`, `MEDIUM` or `HIGH`. |
| `validityParameters` | Where the product is valid, for example lines, zones or a parking facility. |

To change the draft, send the complete product with `PUT`:

::endpoint[products-api/updateSupplementProductVersion]

## Check the references

While the product is a draft or under test, the API only checks that the parameters exist. The
full [coverage rule](/docs/partner-services/fare-data/versions-and-lifecycle#coverage-rule)
applies when you publish the product.

## Next steps

[3. Set prices](/guides/fare-data/3-prices)
