4. Test and publish
Send the parameters, the prices and the product to test, and publish them when the whole sales package has been tested. Work from the bottom up: parameters first, then prices, then the product.
Before you begin
Make sure that:
- You have the
idandversionIdof each parameter and fare table you created, and of your product. - You have read Publish order.
1. Send the parameters and prices to test
Send the version of each parameter you created to test, with the effective dates it should have. propose makes it
available in the staging environment. The example is valid from 1 January 2027 with no end date,
so toDate is left out:
POST /v3/parameters/purchase-windows/{id}/{version}/propose
Code
The version now has status PROPOSED.
Send the fare table to test in the same way, with the same effective dates:
POST /v3/fare-tables/{id}/{version}/propose
2. Send the product to test
POST /v3/supplement-products/{id}/{version}/propose
Code
When you propose, the API only checks that the parameters exist. The full coverage rule is checked when you publish.
3. Check what is under test
Read the product back and check that its status is PROPOSED and that the content is right:
Travellers buy sales packages, not products. You test the purchase in the Entur app for staging once the product is in a sales package that is under test. See 5. Create a sales package.
If something is wrong, send the product back to DRAFT, fix it with PUT, and propose it
again:
POST /v3/supplement-products/{id}/{version}/withdraw
4. Publish
When the sales package has been tested, publish in the same order: the parameters first, then
the fare table, then the product. Publish the sales package last. publish makes the version available in the production environment.
POST /v3/parameters/purchase-windows/{id}/{version}/publish
POST /v3/fare-tables/{id}/{version}/publish
POST /v3/supplement-products/{id}/{version}/publish
Code
Give the effective dates again when you publish. The dates you used for testing are not carried
over. fromDate can't be in the past.
What happens if you publish in the wrong order
If you publish the product while a parameter it refers to is still PROPOSED, the API rejects
the request, because a published product needs published parameters:
Code
Publish the parameter, and then publish the product again.