3. Set prices
Prices live in fare tables (FareTable), not on the product. Create a fare table with the price
and link it to the product.
Before you begin
Make sure that:
- You have completed 2. Create a product.
1. Create the fare table
A fare table holds one or more prices. A flat price (FlatPrice) is one amount, whatever the
trip. Each price has an amount, written as a decimal number in a string, and a currency,
written as an ISO 4217 code such as NOK.
The example creates a fare table with a parking price of NOK 120:
Code
A fare table has the same lifecycle as a product. The response has the fare table's id and
the versionId of its first version, which is a DRAFT. Note both.
2. Link the fare table to the product
The product owns the link to its prices. Add the fare table to the product's fareTableRefs
when you create the product or update its draft.
The product refers to the fare table by NeTEx id. When the fare table later gets a new version,
for example with a new price, the product uses the new price from that version's fromDate. See
Price changes.