Entur Developer
Partner
REST
Products V3

Sales package

Server

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

GET
https://api.entur.io/products/partner
/v3/sales-offer-packages

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 a toDate of 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}.

List sales packages with their current versions › query Parameters

page
​integer · min: 0 · style: form · explode: true

Zero-based page number. Defaults to 0.

Default: 0
size
​integer · min: 1 · max: 1000 · style: form · explode: true

Number of instances per page. Defaults to 100.

Default: 100
includeDeprecated
​boolean · style: form · explode: true

Also include the most recent DEPRECATED version of each sales package.

Default: false
ownerOrganisationId
​integer · int64 · style: form · explode: true

Only return sales packages owned by this internal organisation id.

List sales packages with their current versions › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

List sales packages with their current versions › Responses

Paginated list of sales package summaries

A page of sales packages, each with the versions relevant today.
totalCount
​integer · required

Total number of elements matching the query.

Example: 5
page
​integer · required

Current zero-based page number.

Example: 0
size
​integer · required

Requested page size.

Example: 100
​VersionedElementSummary[] · required

The sales packages on this page, ordered by id.


Create a new sales package

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages

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).

Create a new sales package › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Create a new sales package › Request Body

Only the content of the sales package is set here. The status and validity period of the version are set through the `propose` and `publish` operations (see [Versions and lifecycle](/docs/partner-services/fare-data/versions-and-lifecycle)).
​object[] · required
ownerOrganisationId
​integer · int64 · min: 1

Internal 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.

Example: 1
​object[]
​FareProductRef[]

List of fare product references to include in this sales package.

Create a new sales package › Responses

Sales package created successfully

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Get the active version of a sales package

GET
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}

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.

Get the active version of a sales package › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

Get the active version of a sales package › query Parameters

validOnDate
​string · date · style: form · explode: true

The date that the element should be valid for, e.g. the travel date. Defaults to the current date.

Get the active version of a sales package › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Get the active version of a sales package › Responses

The sales package version active on the given date.

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Create a new version of an existing sales package

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}

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.

Create a new version of an existing sales package › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

Create a new version of an existing sales package › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Create a new version of an existing sales package › Request Body

Only the content of the sales package is set here. The status and validity period of the version are set through the `propose` and `publish` operations (see [Versions and lifecycle](/docs/partner-services/fare-data/versions-and-lifecycle)).
​object[] · required
ownerOrganisationId
​integer · int64 · min: 1

Internal 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.

Example: 1
​object[]
​FareProductRef[]

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
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


List versions of a sales package

GET
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/versions

Retrieve all versions of a sales package by its NeTEx ID, including drafts and proposals.

List versions of a sales package › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

List versions of a sales package › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

List versions of a sales package › Responses

List of sales package versions

id
​string · pattern: ^([A-Z]{3}):Version:… · required

The netex id reference to the object.

Example: EXA:Version:001
status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
​ValidBetween · required

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.

created
​string · date-time · required

Created datetime

Example: 2026-07-01T10:00:00Z
changed
​string · date-time · required

Changed datetime

Example: 2026-07-15T10:00:00Z
number
​integer · int64

Version 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.

Example: 1
published
​string · date-time

Timestamp for when the version was published (set to status VERSIONED).

Example: 2026-08-01T12:00:00Z

Get a specific sales package version

GET
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}

Retrieve a specific version of a sales package, identified by NeTEx version id or version number.

Get a specific sales package version › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^(([A-Z]{3}):Version… · required · style: simple

The netex ID or sequence number of the version to retrieve

Get a specific sales package version › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Get a specific sales package version › Responses

The sales package version

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Update an existing sales package version

PUT
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{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).

Update an existing sales package version › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Update an existing sales package version › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Update an existing sales package version › Request Body

Only the content of the sales package is set here. The status and validity period of the version are set through the `propose` and `publish` operations (see [Versions and lifecycle](/docs/partner-services/fare-data/versions-and-lifecycle)).
​object[] · required
ownerOrganisationId
​integer · int64 · min: 1

Internal 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.

Example: 1
​object[]
​FareProductRef[]

List of fare product references to include in this sales package.

Update an existing sales package version › Responses

Sales package version updated successfully

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Delete a sales package version

DELETE
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}

Delete a sales package version. Only DRAFT versions can be deleted.

Delete a sales package version › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Delete a sales package version › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Delete a sales package version › Responses

Sales package version deleted

No data returned

Send a sales offer package version to test

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}/propose

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.

Send a sales offer package version to test › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Send a sales offer package version to test › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Send a sales offer package version to test › Request Body

Sends the version to test with the validity period in `validBetween`. Both dates are inclusive.
​ValidBetween · required

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.

note
​AuditNote · maxLength: 400

Free-text note explaining the change. Stored in the audit log of the version.

Example: Klar for test
externalReferenceName
​AuditExternalReferenceName · maxLength: 300

External reference name (e.g. a Jira issue key). Stored in the audit log of the version.

Example: Entur JIRA-sak ETU-75340
externalReferenceUrl
​AuditExternalReferenceUrl · maxLength: 300

External reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.

Example: https://enturas.atlassian.net/browse/ETU-75340

Send a sales offer package version to test › Responses

The sales offer package version after the operation

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Send a sales offer package version back to DRAFT

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}/withdraw

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.

Send a sales offer package version back to DRAFT › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Send a sales offer package version back to DRAFT › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Send a sales offer package version back to DRAFT › Request Body optional

An optional note and external reference explaining why the version is withdrawn.
note
​AuditNote · maxLength: 400

Free-text note explaining the change. Stored in the audit log of the version.

Example: Klar for test
externalReferenceName
​AuditExternalReferenceName · maxLength: 300

External reference name (e.g. a Jira issue key). Stored in the audit log of the version.

Example: Entur JIRA-sak ETU-75340
externalReferenceUrl
​AuditExternalReferenceUrl · maxLength: 300

External reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.

Example: https://enturas.atlassian.net/browse/ETU-75340

Send a sales offer package version back to DRAFT › Responses

The sales offer package version after the operation

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Publish a sales offer package version

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}/publish

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.fromDate cannot 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 toDate becomes the day before fromDate of 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.

Publish a sales offer package version › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Publish a sales offer package version › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Publish a sales offer package version › Request Body

Publishes the version with the validity period in `validBetween`. Both dates are inclusive. The dates used while the version was tested are not carried over.
​ValidBetween · required

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.

note
​AuditNote · maxLength: 400

Free-text note explaining the change. Stored in the audit log of the version.

Example: Klar for test
externalReferenceName
​AuditExternalReferenceName · maxLength: 300

External reference name (e.g. a Jira issue key). Stored in the audit log of the version.

Example: Entur JIRA-sak ETU-75340
externalReferenceUrl
​AuditExternalReferenceUrl · maxLength: 300

External reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.

Example: https://enturas.atlassian.net/browse/ETU-75340

Publish a sales offer package version › Responses

The sales offer package version after the operation

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Set the last valid day of a published sales offer package version

POST
https://api.entur.io/products/partner
/v3/sales-offer-packages/{id}/{version}/expire

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 toDate has passed cannot be changed.
  • toDate cannot 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.

Set the last valid day of a published sales offer package version › path Parameters

id
​string · pattern: ^([A-Z]{3}):([A-Za-z… · required · style: simple

The netex ID of the element to retrieve

version
​string · pattern: ^([A-Z]{3}):Version:… · required · style: simple

The NeTEx ID of the version (version.id in the response). A version number is not accepted on endpoints that change or delete a version.

Set the last valid day of a published sales offer package version › Headers

ET-Client-Name
​string · style: simple

Entur 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-Id
​string · style: simple

Correlation id

Set the last valid day of a published sales offer package version › Request Body

The new last valid day of a published version.
toDate
​string · date · required

Last day the version is valid (inclusive). Cannot be in the past.

Example: 2026-12-31
note
​AuditNote · maxLength: 400

Free-text note explaining the change. Stored in the audit log of the version.

Example: Klar for test
externalReferenceName
​AuditExternalReferenceName · maxLength: 300

External reference name (e.g. a Jira issue key). Stored in the audit log of the version.

Example: Entur JIRA-sak ETU-75340
externalReferenceUrl
​AuditExternalReferenceUrl · maxLength: 300

External reference URL (e.g. a Jira issue URL). Stored in the audit log of the version.

Example: https://enturas.atlassian.net/browse/ETU-75340

Set the last valid day of a published sales offer package version › Responses

The sales offer package version after the operation

id
​string · pattern: ^([A-Z]{3}):SalesOff… · required

NeTEx ID of the sales package.

Example: VYG:SalesOfferPackage:07c4332c
versionId
​string · pattern: ^([A-Z]{3}):Version:… · required

NeTEx id of this sales package version.

Example: VYG:Version:SP-905ec954-abcd-1234-efgh-567890abcdef
ownerOrganisationId
​integer · int64 · required

Internal id of the organisation that owns this sales package.

Example: 1
​object[] · required
​ValidBetween · required

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.

status
​VersionStatus · enum · required
Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
versionNumber
​integer · int64

Sequence number of this version, when assigned.

Example: 14
​object[]
​FareProductRef[]

List of fare product references included in this sales package.


Did you find what you were looking for?