Fine-grained modification of sales packages. The client sends a full request body and has full control over the sales package content.
List sales packages with their current versions
Returns a paginated list of sales packages, ordered by id. Each entry is a light summary
(VersionedElementSummary, shared with other element types) with the sales package id and the
versions that are relevant today:
- VERSIONED versions valid today or in the future (no
toDate, or atoDateof today or later) - 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. Sales packages without any such version are left out. Paging is per sales package, so the versions of one sales package are never split across pages.
All versions of a single sales package are available through
GET /v3/sales-offer-packages/{id}/versions, and the full content of a version through
GET /v3/sales-offer-packages/{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 sales package.
ownerOrganisationIdOnly return sales packages 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 sales packages with their current versions › Responses
Paginated list of sales package summaries
totalCountTotal number of elements matching the query.
pageCurrent zero-based page number.
sizeRequested page size.
The sales packages on this page, ordered by id.
Create a new sales package
Create a new sales package. A new version is created together with it, with status DRAFT and
today as start date. The status and validity period are set through
the propose and publish operations (see Versions and lifecycle).
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 sales package › Request Body
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.
List of fare product references to include in this sales package.
Create a new sales package › Responses
Sales package created successfully
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Get the active version of a sales package
Retrieve the version of the sales package 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 sales package › Responses
The sales package version active on the given date.
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Create a new version of an existing sales package
Create a new version of an existing sales package with a full replacement of its content. The client should first retrieve the current sales package, modify the desired fields, and send the complete object.
The new version gets status DRAFT and today as start date. The status and validity period
are set through the propose and publish operations (see Versions and lifecycle). Only one DRAFT
or PROPOSED version may exist at a time.
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 sales package › Request Body
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.
List of fare product references to include in this sales package.
Create a new version of an existing sales package › Responses
Sales package version created successfully
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
List versions of a sales package
Retrieve all versions of a sales package 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 sales package › Responses
List of sales package versions
id^([A-Z]{3}):Version:… · requiredThe netex id reference to the object.
statusThe validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
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.
publishedTimestamp for when the version was published (set to status VERSIONED).
Get a specific sales package version
Retrieve a specific version of a sales package, 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 sales package version › Responses
The sales package version
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Update an existing sales package version
Update the content of a sales package version in place. Only DRAFT versions can be updated.
The status and validity period of the version are not changed here; use
the propose and publish operations (see Versions and lifecycle).
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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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 sales package version › Request Body
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.
List of fare product references to include in this sales package.
Update an existing sales package version › Responses
Sales package version updated successfully
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Delete a sales package version
Delete a sales package 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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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 sales package version › Responses
Sales package version deleted
Send a sales offer package version to test
Sends the version to test with the validity period in validBetween. The version becomes
PROPOSED. Can be called on a DRAFT or a PROPOSED version; call it again to test with other dates.
The content of the sales offer package is not changed; it is edited with
PUT /v3/sales-offer-packages/{id}/{version} while the version is a DRAFT.
The optional note and external reference are stored as an audit log entry for the version, in the same transaction. The person responsible is resolved from the authenticated caller.
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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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
Send a sales offer package version to test › Request Body
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
noteFree-text note explaining the change. Stored in the audit log of the version.
externalReferenceNameExternal reference name (e.g. a Jira issue key). Stored in the audit log of the version.
externalReferenceUrlExternal reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.
Send a sales offer package version to test › Responses
The sales offer package version after the operation
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Send a sales offer package version back to DRAFT
Sends a PROPOSED version back to DRAFT, so its content can be changed with
PUT /v3/sales-offer-packages/{id}/{version}. The validity period is kept. The request body is optional.
The optional note and external reference are stored as an audit log entry for the version, in the same transaction. The person responsible is resolved from the authenticated caller.
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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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
Send a sales offer package version back to DRAFT › Request Body optional
noteFree-text note explaining the change. Stored in the audit log of the version.
externalReferenceNameExternal reference name (e.g. a Jira issue key). Stored in the audit log of the version.
externalReferenceUrlExternal reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.
Send a sales offer package version back to DRAFT › Responses
The sales offer package version after the operation
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Publish a sales offer package version
Publishes a PROPOSED version with the validity period in validBetween. The version becomes
VERSIONED and is given the next version number. The dates used while the version was tested are
not carried over, so they must be given again.
Rules when publishing:
validBetween.fromDatecannot be in the past.- The version cannot overlap, or leave a gap to, another published version of the sales offer package.
- An open-ended previous version is ended automatically: its
toDatebecomes the day beforefromDateof this version. A version with exactly the same validity period is set to DEPRECATED. Other overlaps are rejected.
The optional note and external reference are stored as an audit log entry for the version, in the same transaction. The person responsible is resolved from the authenticated caller.
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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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
Publish a sales offer package version › Request Body
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
noteFree-text note explaining the change. Stored in the audit log of the version.
externalReferenceNameExternal reference name (e.g. a Jira issue key). Stored in the audit log of the version.
externalReferenceUrlExternal reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.
Publish a sales offer package version › Responses
The sales offer package version after the operation
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.
Set the last valid day of a published sales offer package version
Sets or moves toDate, the last valid day (inclusive), of a VERSIONED version. fromDate cannot
be changed. The end date cannot be removed.
Rules when expiring:
- A version whose
toDatehas passed cannot be changed. toDatecannot be in the past.- The version cannot overlap, or leave a gap to, another published version. A version that has a published successor can therefore not be moved.
- DRAFT and PROPOSED versions are not considered. They are checked against this version when they are published.
The optional note and external reference are stored as an audit log entry for the version, in the same transaction. The person responsible is resolved from the authenticated caller.
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 of the version (version.id in the response). A version number is not accepted on
endpoints that change or delete a version.
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
Set the last valid day of a published sales offer package version › Request Body
toDateLast day the version is valid (inclusive). Cannot be in the past.
noteFree-text note explaining the change. Stored in the audit log of the version.
externalReferenceNameExternal reference name (e.g. a Jira issue key). Stored in the audit log of the version.
externalReferenceUrlExternal reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.
Set the last valid day of a published sales offer package version › Responses
The sales offer package version after the operation
id^([A-Z]{3}):SalesOff… · requiredNeTEx ID of the sales package.
versionId^([A-Z]{3}):Version:… · requiredNeTEx id of this sales package version.
ownerOrganisationIdInternal id of the organisation that owns this sales package.
The validity period of a version, modelled on NeTEx ValidBetween. Both dates are inclusive:
the version is valid from the start of fromDate up to and including the whole of toDate.
This follows NeTEx, where ToDate is documented as inclusive
(netex_validityCondition_version.xsd),
and the Nordic NeTEx profile examples, which give the last valid day as
ToDate (e.g. 2018-12-31T23:59:59,
fares-penalty.xml).
The dates are calendar dates; NeTEx uses xsd:dateTime, so toDate corresponds to the end of
that day in a NeTEx export.
statusversionNumberSequence number of this version, when assigned.
List of fare product references included in this sales package.