A purchase window defines when a product can be purchased relative
to the time of travel — for example up to 90 days before and at least one hour before
departure, or only until the day before travel. Products reference it through
purchaseWindowRef.
List purchase windows with their current versions
Returns a paginated list of purchase windows, ordered by id. Each entry is a light summary
(VersionedElementSummary, shared with other element types) with the purchase window id
and the versions that are relevant today:
- VERSIONED versions valid today or in the future (no end date, or an end date after today)
- DRAFT and PROPOSED versions, regardless of date
- with
includeDeprecated=true, also the most recent DEPRECATED version (latest start date)
Versions are ordered by status (DRAFT, PROPOSED, VERSIONED, DEPRECATED) and then by start date, newest first. Purchase windows without any such version are left out. Paging is per purchase window, so the versions of one purchase window are never split across pages.
All versions of a single purchase window are available through
GET /v3/parameters/purchase-windows/{id}/versions, and the full content of a version through
GET /v3/parameters/purchase-windows/{id}/{version}.
query Parameters
pageZero-based page number. Defaults to 0.
sizeNumber of instances per page. Defaults to 100.
includeDeprecatedAlso include the most recent DEPRECATED version of each purchase window.
ownerOrganisationIdOnly return purchase windows owned by this internal organisation id.
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
List purchase windows with their current versions › Responses
Paginated list of purchase window summaries
totalCountTotal number of elements matching the query.
pageCurrent zero-based page number.
sizeRequested page size.
The purchase windows on this page, ordered by id.
Create a new purchase window
Create a new purchase window. A new version is created together with it.
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Create a new purchase window › Request Body
startDateFirst day this purchase window version is valid.
statusStatus of the purchase window version. Required; on create only DRAFT or PROPOSED is accepted — a new version cannot be published directly.
ownerOrganisationIdInternal id of the organisation that owns this element. Omit it to use the organisation in the access token, which is what a caller acting for itself should do. Supplying a different organisation requires permission to act on behalf of that organisation.
endDateLast day this purchase window version is valid (optional). Omit for an open-ended version.
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTime^([01][0-9]|2[0-3]):…Latest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure that a purchase must be made (NeTEx
MinimumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
maximumPeriodBeforeDepartureMaximum period before departure that a purchase can be made (NeTEx
MaximumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
Must not be shorter than minimumPeriodBeforeDeparture.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment, a list).
Create a new purchase window › Responses
Purchase window created successfully
id^([A-Z]{3}):Purchase… · requiredNeTEx id of the purchase window.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this purchase window version.
ownerOrganisationIdInternal organisation id owning this purchase window.
startDateFirst day this purchase window version is valid.
statusversionNumberSequence number of this version, when assigned.
endDateLast day this purchase window version is valid (optional).
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTimeLatest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure (NeTEx MinimumPeriodBeforeDeparture). ISO 8601 duration.
maximumPeriodBeforeDepartureMaximum period before departure (NeTEx MaximumPeriodBeforeDeparture). ISO 8601 duration.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment).
Get the active version of a purchase window
Retrieve the version of the purchase window that is active on the given date. Defaults to the version active today when no date is given.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
query Parameters
validOnDateThe date that the element should be valid for, e.g. the travel date. Defaults to the current date.
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Get the active version of a purchase window › Responses
The purchase window version active on the given date.
id^([A-Z]{3}):Purchase… · requiredNeTEx id of the purchase window.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this purchase window version.
ownerOrganisationIdInternal organisation id owning this purchase window.
startDateFirst day this purchase window version is valid.
statusversionNumberSequence number of this version, when assigned.
endDateLast day this purchase window version is valid (optional).
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTimeLatest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure (NeTEx MinimumPeriodBeforeDeparture). ISO 8601 duration.
maximumPeriodBeforeDepartureMaximum period before departure (NeTEx MaximumPeriodBeforeDeparture). ISO 8601 duration.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment).
Create a new version of an existing purchase window
Create a new version of an existing purchase window. Products referencing the purchase window are not modified: they point at its id, and the effective version is resolved by validity period.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Create a new version of an existing purchase window › Request Body
startDateFirst day this purchase window version is valid.
statusStatus of the purchase window version. Required; on create only DRAFT or PROPOSED is accepted — a new version cannot be published directly.
ownerOrganisationIdInternal id of the organisation that owns this element. Omit it to use the organisation in the access token, which is what a caller acting for itself should do. Supplying a different organisation requires permission to act on behalf of that organisation.
endDateLast day this purchase window version is valid (optional). Omit for an open-ended version.
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTime^([01][0-9]|2[0-3]):…Latest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure that a purchase must be made (NeTEx
MinimumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
maximumPeriodBeforeDepartureMaximum period before departure that a purchase can be made (NeTEx
MaximumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
Must not be shorter than minimumPeriodBeforeDeparture.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment, a list).
Create a new version of an existing purchase window › Responses
Purchase window version created successfully
id^([A-Z]{3}):Purchase… · requiredNeTEx id of the purchase window.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this purchase window version.
ownerOrganisationIdInternal organisation id owning this purchase window.
startDateFirst day this purchase window version is valid.
statusversionNumberSequence number of this version, when assigned.
endDateLast day this purchase window version is valid (optional).
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTimeLatest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure (NeTEx MinimumPeriodBeforeDeparture). ISO 8601 duration.
maximumPeriodBeforeDepartureMaximum period before departure (NeTEx MaximumPeriodBeforeDeparture). ISO 8601 duration.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment).
List versions of a purchase window
Retrieve all versions of a purchase window by its NeTEx ID, including drafts and proposals.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
List versions of a purchase window › Responses
List of purchase window versions
id^([A-Z]{3}):Version:… · requiredThe netex id reference to the object.
statusstartDateThe start date of the version.
createdCreated datetime
changedChanged datetime
numberVersion number of the version. Only present when versionStatus is VERSIONED. Starts at 1 for a new product and is incremented by 1 for each new version.
endDateThe end date of the version.
publishedTimestamp for when the version was published (set to status VERSIONED).
Get a specific purchase window version
Retrieve a specific version of a purchase window, identified by NeTEx version id or version number.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
version^(([A-Z]{3}):Version… · required · style: simpleThe netex ID or sequence number of the version to retrieve
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Get a specific purchase window version › Responses
The purchase window version
id^([A-Z]{3}):Purchase… · requiredNeTEx id of the purchase window.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this purchase window version.
ownerOrganisationIdInternal organisation id owning this purchase window.
startDateFirst day this purchase window version is valid.
statusversionNumberSequence number of this version, when assigned.
endDateLast day this purchase window version is valid (optional).
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTimeLatest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure (NeTEx MinimumPeriodBeforeDeparture). ISO 8601 duration.
maximumPeriodBeforeDepartureMaximum period before departure (NeTEx MaximumPeriodBeforeDeparture). ISO 8601 duration.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment).
Update an existing purchase window version
Update a purchase window version in place. Only DRAFT versions can be updated.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
version^(([A-Z]{3}):Version… · required · style: simpleThe netex ID or sequence number of the version to retrieve
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Update an existing purchase window version › Request Body
startDateFirst day this purchase window version is valid.
statusStatus of the purchase window version. Required; on create only DRAFT or PROPOSED is accepted — a new version cannot be published directly.
ownerOrganisationIdInternal id of the organisation that owns this element. Omit it to use the organisation in the access token, which is what a caller acting for itself should do. Supplying a different organisation requires permission to act on behalf of that organisation.
endDateLast day this purchase window version is valid (optional). Omit for an open-ended version.
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTime^([01][0-9]|2[0-3]):…Latest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure that a purchase must be made (NeTEx
MinimumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
maximumPeriodBeforeDepartureMaximum period before departure that a purchase can be made (NeTEx
MaximumPeriodBeforeDeparture). ISO 8601 duration with days, hours, minutes and/or seconds.
Must not be shorter than minimumPeriodBeforeDeparture.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment, a list).
Update an existing purchase window version › Responses
Purchase window version updated successfully
id^([A-Z]{3}):Purchase… · requiredNeTEx id of the purchase window.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this purchase window version.
ownerOrganisationIdInternal organisation id owning this purchase window.
startDateFirst day this purchase window version is valid.
statusversionNumberSequence number of this version, when assigned.
endDateLast day this purchase window version is valid (optional).
purchaseWhenWhen a purchase can be made relative to the time of travel.
- ADVANCE_ONLY - Only in advance of the day of travel.
- UNTIL_PREVIOUS_DAY - Until the end of the day before travel.
- DAY_OF_TRAVEL_ONLY - Only on the day of travel.
- ADVANCE_AND_DAY_OF_TRAVEL - In advance or on the day of travel.
- TIME_OF_TRAVEL_ONLY - Only at the time of travel.
- SUBSCRIPTION_CHARGE_MOMENT - At the charge moment of a subscription.
- OTHER - Other rule.
latestTimeLatest time of day a purchase can be made (NeTEx LatestTime), formatted HH:mm:ss.
minimumPeriodBeforeDepartureMinimum period before departure (NeTEx MinimumPeriodBeforeDeparture). ISO 8601 duration.
maximumPeriodBeforeDepartureMaximum period before departure (NeTEx MaximumPeriodBeforeDeparture). ISO 8601 duration.
purchaseActionThe type of purchase action the window applies to.
purchaseMomentsThe moments at which a purchase can be made (NeTEx PurchaseMoment).
Delete a purchase window version
Delete a purchase window version. Only DRAFT versions can be deleted.
path Parameters
id^([A-Z]{3}):([A-Za-z… · required · style: simpleThe netex ID of the element to retrieve
version^(([A-Z]{3}):Version… · required · style: simpleThe netex ID or sequence number of the version to retrieve
Headers
ET-Client-NameEntur Client Header.
It is required that all consumers identify themselves by using this header.
Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.
The structure of ET-Client-Name should be: <company>-<application>.
X-Correlation-IdCorrelation id
Delete a purchase window version › Responses
Purchase window version deleted