Entur Developer
Partner
REST
Ticket Distributions

Ticket Distribution Groups

Server

Services regarding ticket distribution group level.


Search generated and distributed ticket distribution groups

GET
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups

Searches generated and distributed ticket distribution groups. Query parameters supports operators eq, ne, gt, gte, lt, lte, in, and nin. Defaults to eq if no operator is given. At least one search parameter is required.

Search generated and distributed ticket distribution groups › query Parameters

id
​string[] · style: form · explode: true

Filters by ticket distribution group ID

Example: ["1234"]
Default: []
orderId
​string[] · style: form · explode: true

Filters by order ID

Example: ["NTA2JGR7"]
Default: []
orderVersion
​string[] · style: form · explode: true

Filters by order version

Example: ["1"]
Default: []
orderLineId
​string[] · style: form · explode: true

Filters by order line ID

Example: ["26b02145-7dbf-4be9-8600-ff4a570d83d5"]
Default: []
orderOwnerCustomerId
​string[] · style: form · explode: true

Filters by field orderOwnerCustomerId on ticket distribution group. Field is a string with only numeric values.

Example: ["1234"]
Default: []
distributionHolderCustomerId
​string[] · style: form · explode: true

Filters by field distributionHolderCustomerId on ticket distribution group. Field is a string with only numeric values.

Example: ["1234"]
Default: []
organisationId
​string[] · style: form · explode: true

Filters by organisation if the user has correct privileges

Example: ["1"]
Default: []
ticketDistributionId
​string[] · style: form · explode: true

Filters by ticket distribution id

Example: ["1234"]
Default: []
distributionStatus
​string[] · style: form · explode: true

Filters by ticket distributions group containing a ticket distribution status matching specified query

Example: ["DISTRIBUTED"]
Default: []
mediaSerialNumberId
​string[] · style: form · explode: true

Filters by mediaSerialNumberId, id identifying the ecard

Example: ["1234"]
Default: []
createdAt
​string[] · style: form · explode: true

Filters by when ticket distributions were created

Example: ["gte:2023-01-01T00:00:00Z","lt:2023-12-31T23:59:59Z"]
Default: []
updatedAt
​string[] · style: form · explode: true

Filters by when ticket distributions last were updated

Example: ["2023-01-01T00:00:00Z","2023-12-31T23:59:59Z"]
Default: []
startOfValidity
​string[] · style: form · explode: true

Filters by field startOfValidity on ticket distributions. Must be timestamp string. Supports search in a range by specifying two timestamps each prefixed with an operator.

Example: ["2023-01-01T00:00:00Z","2023-12-31T23:59:59Z"]
Default: []
endOfValidity
​string[] · style: form · explode: true

Filters by field endOfValidity on ticket distributions. Must be timestamp string. Supports search in a range by specifying two timestamps each prefixed with an operator.

Example: ["2023-01-01T00:00:00Z","2023-12-31T23:59:59Z"]
Default: []
customers
​string[] · style: form · explode: true

Filters by customer id

Example: ["1234"]
Default: []
page
​integer · int32 · style: form · explode: true

Selects a specific page in the collection

Example: 2
Default: 1
perPage
​integer · int32 · max: 100 · style: form · explode: true

Specifies the number of entries returned in a page. Maximum allowed value is 100.

Example: 20
Default: 30

Search generated and distributed ticket distribution groups › 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

Accepts-Language
​string · style: simple

A header used to select language

Current supported languages are 'nob', 'nno' and 'eng'

Search generated and distributed ticket distribution groups › Responses

OK

Page displays a subset of a list of entities
​TicketDistributionGroup[] · readOnly · required

Items on a specific page

totalItems
​integer · int64 · readOnly · required

Total number of items

Example: 72
totalPages
​integer · int64 · readOnly · required

Total number of pages available to browse

Example: 9

Distribute ticket distribution groups

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/distribute

Distribute a set of ticket distribution groups to NOD.

Distribute ticket distribution groups › Headers

Entur-Pos
​string · required · style: simple

A header containing a point-of-sale reference

Example: MyApplication
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

Entur-Distribution-Channel
​string · style: simple

A header containing a distribution channel reference

Example: ENT:DistributionChannel:App

Distribute ticket distribution groups › Request Body

Distribute a set of ticket distribution groups to NOD
orderId
​string · required

ID of the order

orderVersion
​integer · int32 · required

Version of the order

Default: 1
deliverAfter
​string · date-time

The earliest time it should be possible to pick up the ticket(s)

​OrderLineDistributionRequest[]

List of specific orderlineIds to distribute tickets for. If not specified, all tickets for the order will be distributed.

qrChecksumType
​integer · int32

The 'toughness' of the QR-code. If not specified the service will determine it automatically based on deliverAfter and startOfValidity

languageCode
​LanguageCode · enum

Desired language. Makes display text appear in defined language - if available. Default: nob

Enum values:
nob
nno
eng
Default: nob

Distribute ticket distribution groups › Responses

OK

id
​integer · int64 · required
orderId
​string · required
orderLineId
​string · required
orderVersion
​integer · int32 · required
​TicketDistribution[] · required
updatedForOrderLineVersion
​integer · int32 · required
createdByDCI
​string
distributedByDCI
​string
distributedByOrgId
​integer · int64
organisationId
​integer · int64
​SalesPackage
fulfillmentMethod
​string

The fulfillment method given by the order line. Useful for determining which external ticketing system to retrieve validation data from. Possible values: NOD, ACCOUNT_BASED_TICKETING, INTERNATIONAL, BIFROST

orderOwnerCustomerId
​string

The customerId of the customer that owns the order

distributionHolderCustomerId
​string

The customerId of the customer that will receive the ticket


Get specific ticket distribution group by its id

GET
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/{ticketDistributionGroupId}

Get the ticket distribution group located at this path

Get specific ticket distribution group by its id › path Parameters

ticketDistributionGroupId
​integer · int64 · required · style: simple

ticketDistributionGroupId

Get specific ticket distribution group by its id › 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

Accepts-Language
​string · style: simple

A header used to select language

Current supported languages are 'nob', 'nno' and 'eng'

Get specific ticket distribution group by its id › Responses

OK

id
​integer · int64 · required
orderId
​string · required
orderLineId
​string · required
orderVersion
​integer · int32 · required
​TicketDistribution[] · required
updatedForOrderLineVersion
​integer · int32 · required
createdByDCI
​string
distributedByDCI
​string
distributedByOrgId
​integer · int64
organisationId
​integer · int64
​SalesPackage
fulfillmentMethod
​string

The fulfillment method given by the order line. Useful for determining which external ticketing system to retrieve validation data from. Possible values: NOD, ACCOUNT_BASED_TICKETING, INTERNATIONAL, BIFROST

orderOwnerCustomerId
​string

The customerId of the customer that owns the order

distributionHolderCustomerId
​string

The customerId of the customer that will receive the ticket


Transfer the distribution holder for ticket distribution groups

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/transfer-distribution-holder

Transfer the distribution holder for these ticket distribution groups to another customer

Transfer the distribution holder for ticket distribution groups › 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

Entur-Distribution-Channel
​string · style: simple

A header containing a distribution channel reference

Example: ENT:DistributionChannel:App

Transfer the distribution holder for ticket distribution groups › Request Body

​TicketDistributionGroupTransfer[] · required

Transfer the distribution holder for ticket distribution groups › Responses

OK

​SuccessfulTicketDistributionGroupTransfer[] · required
​FailedTicketDistributionGroupTransfer[] · required

Redistribute NOD tickets

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/redistribute

Distributes the ticket distributions to NOD again with a new orderGroupId and pickup code, and cancels the old orderGroup with cancellationReason REDISTRIBUTED. Used to recover tickets that have ended up in an unusable state in NOD, e.g. a periodic ticket that can no longer be picked up. Ticket distributions with status DISTRIBUTED, PICKED_UP, ACTIVATED or VALIDATED on the latest order version can be redistributed. Travel card tickets are not supported.

Redistribute NOD tickets › 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

Entur-Distribution-Channel
​string · style: simple

A header containing a distribution channel reference

Example: ENT:DistributionChannel:App

Redistribute NOD tickets › Request Body

orderId
​string · required

Id of the order whose NOD tickets should be redistributed

ticketDistributionIds
​integer[]

Limits redistribution to these ticket distributions. All redistributable NOD ticket distributions on the latest order version are redistributed if omitted

Redistribute NOD tickets › Responses

OK

id
​integer · int64 · required
orderId
​string · required
orderLineId
​string · required
orderVersion
​integer · int32 · required
​TicketDistribution[] · required
updatedForOrderLineVersion
​integer · int32 · required
createdByDCI
​string
distributedByDCI
​string
distributedByOrgId
​integer · int64
organisationId
​integer · int64
​SalesPackage
fulfillmentMethod
​string

The fulfillment method given by the order line. Useful for determining which external ticketing system to retrieve validation data from. Possible values: NOD, ACCOUNT_BASED_TICKETING, INTERNATIONAL, BIFROST

orderOwnerCustomerId
​string

The customerId of the customer that owns the order

distributionHolderCustomerId
​string

The customerId of the customer that will receive the ticket


Update the validity of ticket distribution groups

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/update-validities

Update the validity of the ticket distribution groups, the endOfValidity is calculated automatically

Update the validity of ticket distribution groups › 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

Entur-Distribution-Channel
​string · style: simple

A header containing a distribution channel reference

Example: ENT:DistributionChannel:App

Update the validity of ticket distribution groups › Request Body

​UpdateValidityRequest[] · required

Update the validity of ticket distribution groups › Responses

OK

​SuccessfulValidityUpdates[] · required
​FailedValidityUpdates[] · required

Activate a ticket (klipp) on an id-based carnet

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/{ticketDistributionGroupId}/ticket-distributions/{ticketDistributionId}/activate-carnet

Activates one ticket on the carnet ticket distribution. The activated ticket gets its own new ticket distribution with the validity returned by ABT and no carnet, and usedCount on the carnet ticket distribution is increased by one. This operation is not idempotent: retrying after a timeout may activate an extra ticket. A 409 response with exception NoCarnetTicketsLeftException means the carnet has no tickets left (nothing is sent to ABT). If the call to ABT fails, the response is 500 and the carnet is not updated.

Activate a ticket (klipp) on an id-based carnet › path Parameters

ticketDistributionGroupId
​integer · int64 · required · style: simple

ticketDistributionGroupId of the ticket distribution group that contains the carnet ticket distribution

ticketDistributionId
​integer · int64 · required · style: simple

Id of the carnet ticket distribution, the one with type CARNET

Activate a ticket (klipp) on an id-based carnet › 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

Entur-Distribution-Channel
​string · style: simple

A header containing a distribution channel reference

Example: ENT:DistributionChannel:App

Activate a ticket (klipp) on an id-based carnet › Request Body optional

elementId
​string

elementId of the validable element (klippekort) to activate. Required if the ticket distribution has more than one validable element

Activate a ticket (klipp) on an id-based carnet › Responses

OK

ticketDistributionGroupId
​integer · int64 · required
carnetTicketDistributionId
​integer · int64 · required
activatedTicketDistributionIds
​integer[] · required

Ids of the new ticket distributions, one per activated ticket. Currently always one

remainingCount
​integer · int32 · required

Number of tickets left on the carnet after this activation


Distribute travel card tickets by order ID

POST
https://api.staging.entur.io/sales
/v1/ticket-distribution-groups/distribute/travel-card/by-order-id/{orderId}

Distribute a set of travel card tickets to NOD for pick-up based on an order ID.

Distribute travel card tickets by order ID › path Parameters

orderId
​string · required · style: simple

orderId

Example: NTA2JGR7

Distribute travel card tickets by order ID › Headers

Entur-Pos
​string · required · style: simple

A header containing a point-of-sale reference

Example: MyApplication
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

Distribute travel card tickets by order ID › Request Body

Request for generating ticket for travel card
activate
​boolean · required

Activate the product

mediaSerialNumberId
​integer · int64 · min: 0 · max: 4294967295 · required

The media serial number (MSN) ID of the travel card

paymentMeansType
​PaymentMeansType · enum · required

The payment means type used to purchase the ticket

Enum values:
NULL
FREE
TPURSE

Distribute travel card tickets by order ID › Responses

OK

id
​integer · int64 · required
orderId
​string · required
orderLineId
​string · required
orderVersion
​integer · int32 · required
​TicketDistribution[] · required
updatedForOrderLineVersion
​integer · int32 · required
createdByDCI
​string
distributedByDCI
​string
distributedByOrgId
​integer · int64
organisationId
​integer · int64
​SalesPackage
fulfillmentMethod
​string

The fulfillment method given by the order line. Useful for determining which external ticketing system to retrieve validation data from. Possible values: NOD, ACCOUNT_BASED_TICKETING, INTERNATIONAL, BIFROST

orderOwnerCustomerId
​string

The customerId of the customer that owns the order

distributionHolderCustomerId
​string

The customerId of the customer that will receive the ticket


Did you find what you were looking for?