Entur Developer
Set up fare data

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:

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:

JSONCode
{ "names": [ { "lang": "nb-NO", "value": "Parkering" }, { "lang": "en-GB", "value": "Parking" } ], "prices": [ { "type": "FlatPrice", "amount": "120.00", "currency": "NOK" } ] }

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.

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.

Next steps

4. Test and publish

Last modified on
Did you find what you were looking for?