Entur Developer
Products

exchanging-possibilities

Server

Retrieves exchanging rules for given elements

POST
https://api.entur.io/products
/exchanging-possibilities

Retrieves exchanging rules for given elements › 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

Accept-Language
​string · style: simple

The language code for the name and description fields.

Entur-Distribution-Channel
​string · style: simple

The id of the distribution channel.

Retrieves exchanging rules for given elements › Request Body

Request for retrieving refunding alternatives for elements.
​IdAndVersion[]

Fare structure elements the user wants to retrieve the parameter alternatives for.

​IdAndVersion[]

Preassigned products the user wants to retrieve the parameter alternatives for.

​IdAndVersion[]

Sales packages the user wants to retrieve the parameter alternatives for.

​IdAndVersion[]

Validable elements the user wants to retrieve the parameter alternatives for.

Retrieves exchanging rules for given elements › Responses

Returns the resource.

Exchanging alternatives for an element.
​Exchanging[] · required

Exchanging alternatives for this element.

​IdAndVersion · required

Describes the ID and version of an element.


Retrieves exchanging rules for given elements

GET
https://api.entur.io/products
/exchanging-possibilities/fare-structure-element/{id}/{version}

Retrieves exchanging rules for given elements › path Parameters

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

The id to identify a fare structure element.

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

The version of the element.

Retrieves exchanging rules for given elements › 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

Accept-Language
​string · style: simple

The language code for the name and description fields.

Entur-Distribution-Channel
​string · style: simple

The id of the distribution channel.

If-None-Match
​string · style: simple

Used to make conditional requests. It allows the client to provide an ETag value, and the server will process the request only if the ETag does not match the current version of the resource.

Retrieves exchanging rules for given elements › Responses

Returns the resource.

​Exchanging[]
Exchanging
changed
​string · required

Changed datetime.

created
​string · required

Created datetime.

​VersionOfObjectRef · required

Fare frame ref.

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

Id.

Example: NSB:Exchanging:MiniFlex
modification
​string · enum · required

Modification status.

Enum values:
NEW
REVISE
DELETE
Example: NEW
nameOfClass
​string · required

Name of class.

Example: Exchanging
status
​string · enum · required

Exchanging status.

Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
allowed
​string · enum

Allowed.

Enum values:
NONE
PARTIAL
FULL
Example: FULL
canChangeClass
​boolean

Whether user can change class.

compatibleWithVersionRef
​string

Compatible with version.

derivedFromVersionRef
​string

Derived from version.

​TextInLanguage[]

Description represented in different languages. Language codes are ISO-639.

exchangeableFromAnyTime
​boolean

Can be exchanged or refunded from any point after purchase.

exchangeableFromDuration
​string

Duration to start of period before (negative) or after (positive) the trigger point resellWhen (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) or that ticket may be exchanged or refunded.

Example: PT24H
exchangeableTo
​string · enum

Type of exchange allowed.

Enum values:
ANY_PRODUCT
SAME_PRODUCT_SAME_DAY
SAME_PRODUCT_ANY_DAY
UPGRADE_TO_STANDARD_FARE
SPECIFIED_PRODUCTS
exchangeableUntilAnyTime
​boolean

Can be exchanged or refunded until any point after purchase.

exchangeableUntilDuration
​string

Duration to end of period before (negative) or after ( positive) the trigger point (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) that ticket may be exchanged or refunded.

Example: PT24H
​VersionOfObjectRef[]

References for associated fare tables.

hasFee
​boolean

Has fee.

​LimitingRule

A LimitingRule

​VersionOfObjectRef

Fare frame ref.

​TextInLanguage[]

Name represented in different languages. Language codes are ISO-639.

numberOfExchangesAllowed
​integer · int32

Number of times a ticket may be exchanged.

onlyAtCertainDistributionPoints
​boolean

Whether distribution is restricted to certain points.

​FarePrice[]

Prices in different currencies for the exchanging rule.

refundBasis
​string · enum

Basis on which refund is made. See allowed values below.

Enum values:
PER_OFFER
PER_PERSON
Example: PER_OFFER
resellWhen
​string · enum

Event marking when the exchangeable status of the ticket changes.

Enum values:
NEVER
BEFORE_START_OF_VALIDITY_PERIOD
AFTER_START_OF_VALIDITY_PERIOD
AFTER_END_OF_VALIDITY_PERIOD
BEFORE_FIRST_USE
AFTER_FIRST_USE
BEFORE_VALIDATION
AFTER_VALIDATION
Example: NEVER
specifiedProducts
​string[]

Reference to the product IDs where exchanging to is allowed. Only use this in combination with 'exchangeableTo.SPECIFIED_PRODUCTS'

toFareClass
​string · enum

Fare class to which can be exchanged.

Enum values:
FIRST_CLASS
SECOND_CLASS
THIRD_CLASS
ECONOMY_CLASS
BUSINESS_CLASS
TURISTA
PREFERENTE
STANDARD_CLASS
unusedTicketsOnly
​boolean

Unused tickets only.

version
​string · minLength: 1 · pattern: ^([A-Z]{3}):([A-Za-z…

Exchanging version.

Example: NSB:Version:V1

Retrieves exchanging rules for given elements

GET
https://api.entur.io/products
/exchanging-possibilities/preassigned-product/{id}/{version}

Retrieves exchanging rules for given elements › path Parameters

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

The id to identify a product.

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

The version of the element.

Retrieves exchanging rules for given elements › 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

Accept-Language
​string · style: simple

The language code for the name and description fields.

Entur-Distribution-Channel
​string · style: simple

The id of the distribution channel.

If-None-Match
​string · style: simple

Used to make conditional requests. It allows the client to provide an ETag value, and the server will process the request only if the ETag does not match the current version of the resource.

Retrieves exchanging rules for given elements › Responses

Returns the resource.

​Exchanging[]
Exchanging
changed
​string · required

Changed datetime.

created
​string · required

Created datetime.

​VersionOfObjectRef · required

Fare frame ref.

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

Id.

Example: NSB:Exchanging:MiniFlex
modification
​string · enum · required

Modification status.

Enum values:
NEW
REVISE
DELETE
Example: NEW
nameOfClass
​string · required

Name of class.

Example: Exchanging
status
​string · enum · required

Exchanging status.

Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
allowed
​string · enum

Allowed.

Enum values:
NONE
PARTIAL
FULL
Example: FULL
canChangeClass
​boolean

Whether user can change class.

compatibleWithVersionRef
​string

Compatible with version.

derivedFromVersionRef
​string

Derived from version.

​TextInLanguage[]

Description represented in different languages. Language codes are ISO-639.

exchangeableFromAnyTime
​boolean

Can be exchanged or refunded from any point after purchase.

exchangeableFromDuration
​string

Duration to start of period before (negative) or after (positive) the trigger point resellWhen (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) or that ticket may be exchanged or refunded.

Example: PT24H
exchangeableTo
​string · enum

Type of exchange allowed.

Enum values:
ANY_PRODUCT
SAME_PRODUCT_SAME_DAY
SAME_PRODUCT_ANY_DAY
UPGRADE_TO_STANDARD_FARE
SPECIFIED_PRODUCTS
exchangeableUntilAnyTime
​boolean

Can be exchanged or refunded until any point after purchase.

exchangeableUntilDuration
​string

Duration to end of period before (negative) or after ( positive) the trigger point (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) that ticket may be exchanged or refunded.

Example: PT24H
​VersionOfObjectRef[]

References for associated fare tables.

hasFee
​boolean

Has fee.

​LimitingRule

A LimitingRule

​VersionOfObjectRef

Fare frame ref.

​TextInLanguage[]

Name represented in different languages. Language codes are ISO-639.

numberOfExchangesAllowed
​integer · int32

Number of times a ticket may be exchanged.

onlyAtCertainDistributionPoints
​boolean

Whether distribution is restricted to certain points.

​FarePrice[]

Prices in different currencies for the exchanging rule.

refundBasis
​string · enum

Basis on which refund is made. See allowed values below.

Enum values:
PER_OFFER
PER_PERSON
Example: PER_OFFER
resellWhen
​string · enum

Event marking when the exchangeable status of the ticket changes.

Enum values:
NEVER
BEFORE_START_OF_VALIDITY_PERIOD
AFTER_START_OF_VALIDITY_PERIOD
AFTER_END_OF_VALIDITY_PERIOD
BEFORE_FIRST_USE
AFTER_FIRST_USE
BEFORE_VALIDATION
AFTER_VALIDATION
Example: NEVER
specifiedProducts
​string[]

Reference to the product IDs where exchanging to is allowed. Only use this in combination with 'exchangeableTo.SPECIFIED_PRODUCTS'

toFareClass
​string · enum

Fare class to which can be exchanged.

Enum values:
FIRST_CLASS
SECOND_CLASS
THIRD_CLASS
ECONOMY_CLASS
BUSINESS_CLASS
TURISTA
PREFERENTE
STANDARD_CLASS
unusedTicketsOnly
​boolean

Unused tickets only.

version
​string · minLength: 1 · pattern: ^([A-Z]{3}):([A-Za-z…

Exchanging version.

Example: NSB:Version:V1

Retrieves exchanging rules for given elements

GET
https://api.entur.io/products
/exchanging-possibilities/sales-package/{id}/{version}

Retrieves exchanging rules for given elements › path Parameters

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

The unique id to identify a sales package.

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

The version of the element.

Retrieves exchanging rules for given elements › 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

Accept-Language
​string · style: simple

The language code for the name and description fields.

Entur-Distribution-Channel
​string · style: simple

The id of the distribution channel.

If-None-Match
​string · style: simple

Used to make conditional requests. It allows the client to provide an ETag value, and the server will process the request only if the ETag does not match the current version of the resource.

Retrieves exchanging rules for given elements › Responses

Returns the resource.

​Exchanging[]
Exchanging
changed
​string · required

Changed datetime.

created
​string · required

Created datetime.

​VersionOfObjectRef · required

Fare frame ref.

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

Id.

Example: NSB:Exchanging:MiniFlex
modification
​string · enum · required

Modification status.

Enum values:
NEW
REVISE
DELETE
Example: NEW
nameOfClass
​string · required

Name of class.

Example: Exchanging
status
​string · enum · required

Exchanging status.

Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
allowed
​string · enum

Allowed.

Enum values:
NONE
PARTIAL
FULL
Example: FULL
canChangeClass
​boolean

Whether user can change class.

compatibleWithVersionRef
​string

Compatible with version.

derivedFromVersionRef
​string

Derived from version.

​TextInLanguage[]

Description represented in different languages. Language codes are ISO-639.

exchangeableFromAnyTime
​boolean

Can be exchanged or refunded from any point after purchase.

exchangeableFromDuration
​string

Duration to start of period before (negative) or after (positive) the trigger point resellWhen (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) or that ticket may be exchanged or refunded.

Example: PT24H
exchangeableTo
​string · enum

Type of exchange allowed.

Enum values:
ANY_PRODUCT
SAME_PRODUCT_SAME_DAY
SAME_PRODUCT_ANY_DAY
UPGRADE_TO_STANDARD_FARE
SPECIFIED_PRODUCTS
exchangeableUntilAnyTime
​boolean

Can be exchanged or refunded until any point after purchase.

exchangeableUntilDuration
​string

Duration to end of period before (negative) or after ( positive) the trigger point (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) that ticket may be exchanged or refunded.

Example: PT24H
​VersionOfObjectRef[]

References for associated fare tables.

hasFee
​boolean

Has fee.

​LimitingRule

A LimitingRule

​VersionOfObjectRef

Fare frame ref.

​TextInLanguage[]

Name represented in different languages. Language codes are ISO-639.

numberOfExchangesAllowed
​integer · int32

Number of times a ticket may be exchanged.

onlyAtCertainDistributionPoints
​boolean

Whether distribution is restricted to certain points.

​FarePrice[]

Prices in different currencies for the exchanging rule.

refundBasis
​string · enum

Basis on which refund is made. See allowed values below.

Enum values:
PER_OFFER
PER_PERSON
Example: PER_OFFER
resellWhen
​string · enum

Event marking when the exchangeable status of the ticket changes.

Enum values:
NEVER
BEFORE_START_OF_VALIDITY_PERIOD
AFTER_START_OF_VALIDITY_PERIOD
AFTER_END_OF_VALIDITY_PERIOD
BEFORE_FIRST_USE
AFTER_FIRST_USE
BEFORE_VALIDATION
AFTER_VALIDATION
Example: NEVER
specifiedProducts
​string[]

Reference to the product IDs where exchanging to is allowed. Only use this in combination with 'exchangeableTo.SPECIFIED_PRODUCTS'

toFareClass
​string · enum

Fare class to which can be exchanged.

Enum values:
FIRST_CLASS
SECOND_CLASS
THIRD_CLASS
ECONOMY_CLASS
BUSINESS_CLASS
TURISTA
PREFERENTE
STANDARD_CLASS
unusedTicketsOnly
​boolean

Unused tickets only.

version
​string · minLength: 1 · pattern: ^([A-Z]{3}):([A-Za-z…

Exchanging version.

Example: NSB:Version:V1

Retrieves exchanging rules for given elements

GET
https://api.entur.io/products
/exchanging-possibilities/validable-element/{id}/{version}

Retrieves exchanging rules for given elements › path Parameters

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

The id to identify a validable element.

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

The version of the element.

Retrieves exchanging rules for given elements › 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

Accept-Language
​string · style: simple

The language code for the name and description fields.

Entur-Distribution-Channel
​string · style: simple

The id of the distribution channel.

If-None-Match
​string · style: simple

Used to make conditional requests. It allows the client to provide an ETag value, and the server will process the request only if the ETag does not match the current version of the resource.

Retrieves exchanging rules for given elements › Responses

Returns the resource.

​Exchanging[]
Exchanging
changed
​string · required

Changed datetime.

created
​string · required

Created datetime.

​VersionOfObjectRef · required

Fare frame ref.

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

Id.

Example: NSB:Exchanging:MiniFlex
modification
​string · enum · required

Modification status.

Enum values:
NEW
REVISE
DELETE
Example: NEW
nameOfClass
​string · required

Name of class.

Example: Exchanging
status
​string · enum · required

Exchanging status.

Enum values:
DRAFT
PROPOSED
VERSIONED
DEPRECATED
Example: DRAFT
allowed
​string · enum

Allowed.

Enum values:
NONE
PARTIAL
FULL
Example: FULL
canChangeClass
​boolean

Whether user can change class.

compatibleWithVersionRef
​string

Compatible with version.

derivedFromVersionRef
​string

Derived from version.

​TextInLanguage[]

Description represented in different languages. Language codes are ISO-639.

exchangeableFromAnyTime
​boolean

Can be exchanged or refunded from any point after purchase.

exchangeableFromDuration
​string

Duration to start of period before (negative) or after (positive) the trigger point resellWhen (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) or that ticket may be exchanged or refunded.

Example: PT24H
exchangeableTo
​string · enum

Type of exchange allowed.

Enum values:
ANY_PRODUCT
SAME_PRODUCT_SAME_DAY
SAME_PRODUCT_ANY_DAY
UPGRADE_TO_STANDARD_FARE
SPECIFIED_PRODUCTS
exchangeableUntilAnyTime
​boolean

Can be exchanged or refunded until any point after purchase.

exchangeableUntilDuration
​string

Duration to end of period before (negative) or after ( positive) the trigger point (i.e. either BEFORE_START_OF_VALIDITY_PERIOD or BEFORE_FIRST_USE) that ticket may be exchanged or refunded.

Example: PT24H
​VersionOfObjectRef[]

References for associated fare tables.

hasFee
​boolean

Has fee.

​LimitingRule

A LimitingRule

​VersionOfObjectRef

Fare frame ref.

​TextInLanguage[]

Name represented in different languages. Language codes are ISO-639.

numberOfExchangesAllowed
​integer · int32

Number of times a ticket may be exchanged.

onlyAtCertainDistributionPoints
​boolean

Whether distribution is restricted to certain points.

​FarePrice[]

Prices in different currencies for the exchanging rule.

refundBasis
​string · enum

Basis on which refund is made. See allowed values below.

Enum values:
PER_OFFER
PER_PERSON
Example: PER_OFFER
resellWhen
​string · enum

Event marking when the exchangeable status of the ticket changes.

Enum values:
NEVER
BEFORE_START_OF_VALIDITY_PERIOD
AFTER_START_OF_VALIDITY_PERIOD
AFTER_END_OF_VALIDITY_PERIOD
BEFORE_FIRST_USE
AFTER_FIRST_USE
BEFORE_VALIDATION
AFTER_VALIDATION
Example: NEVER
specifiedProducts
​string[]

Reference to the product IDs where exchanging to is allowed. Only use this in combination with 'exchangeableTo.SPECIFIED_PRODUCTS'

toFareClass
​string · enum

Fare class to which can be exchanged.

Enum values:
FIRST_CLASS
SECOND_CLASS
THIRD_CLASS
ECONOMY_CLASS
BUSINESS_CLASS
TURISTA
PREFERENTE
STANDARD_CLASS
unusedTicketsOnly
​boolean

Unused tickets only.

version
​string · minLength: 1 · pattern: ^([A-Z]{3}):([A-Za-z…

Exchanging version.

Example: NSB:Version:V1

Did you find what you were looking for?