Entur Developer
Partner
REST
Consents API

ConsentBaseRequest

Create new consent base
consentCode
​string · maxLength: 20 · required

Consent code, identifying the consent base. Must be unique within the system, prefixing it with the organisation's code space is advisable tp avoid conflict. Has a maximum length of 20 characters.

Example: ENT_INFO_SMS
​ConsentTermsRequest[] · required

Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown

consentOwnerOrgId
​integer | null · int64

The organisation that owns the consent. If not set all organisations can use the consent base. |If you're a partner, this will be filled out from your authentication token.

​array | null

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string | null

The pattern on which to perform substitution within terms. Facilitates reusable consent bases across organisations.

Example: [ORG]
validFrom
​string | null · date-time

If set, the date the consent base is valid from. It is not possible to change the terms after this date without creating a new version. If not set, the consent base is in draft mode.

Example: 2019-04-05T14:30:30+02:00
validTo
​string | null · date-time

If set, the date the consent base is valid to. Set the date to deactivate the consent. If not set the consent is active from validFrom and onwards.

Example: 2019-04-05T14:30:30+02:00

ConsentBaseResponse

Consent base
changedAt
​string · date-time · required

When the consent base was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
consentCode
​string · required

Consent code used to identify the consent base

Example: ENT_INFO_SMS
createdAt
​string · date-time · required

When the consent base was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
​ConsentTermsResponse[] · required

Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown

version
​integer · int32 · required

The consent base version

consentOwnerOrgId
​integer | null · int64

The organisation that owns the consent base. If not set, the consent base can be used by all organisations.

​array | null

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string | null

The pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations

Example: [ORG]
validFrom
​string | null · date-time

If set, the date the consent base is valid from. It is not possible to change the consent terms after this date without creating a new version. If not set, the consent base is in draft mode.

Example: 2019-04-05T14:30:30+02:00
validTo
​string | null · date-time

If set, the date the consent base is valid to. If this date is in the past, the consent base is deactivated. If not set, the consent is active from validFrom and onwards.

Example: 2019-04-05T14:30:30+02:00

ConsentBaseVersionPatchRequest

Request to update updatable fields after the consent base is active
​array | null

The internal description. Is only exposed for admin endpoints

​array | null

Terms to add. Only new languages can be added to existing terms. Updating terms for an existing language will result in an exception.

validTo
​string | null · date-time

If set, the date the consent base is valid to. Set the date to deactivate the consent base. If not set, the consent base is active from validFrom and onwards

Example: 2019-04-05T14:30:30+02:00

ConsentBaseVersionRequest

Request body for updating a consent base in draft mode or creating a new version of a consent base.
​ConsentTermsRequest[] · required

Consent description and terms in multiple languages. Supports MarkDown

​array | null

Internal description, describing what the usecases are for the consent

orgNameSubstitutionPattern
​string | null

The pattern on which to perform substitution within consentDescription and consentTerms. Facilitates reusable consents across organisations.

Example: [ORG]
validFrom
​string | null · date-time

The date the consent base is valid from. It is not possible to change the consent terms after this date without creating a new version. If not set the consent is in draft mode.

Example: 2019-04-05T14:30:30+02:00
validTo
​string | null · date-time

If set, the date the consent base id valid to. Set the date to deactivate the consent. If not set the consent is active from validFrom and forever after

Example: 2019-04-05T14:30:30+02:00

ConsentCrmResponse

A condensed view of consent information
consentBaseVersion
​integer · int32 · required

The consent base version associated with the consent

consentCode
​string · required

The consent code of the base consent associated with the consent

consentId
​integer · int64 · required

The id of the Consent that has been consented

consentOrganisationId
​integer · int64 · required

The organisation that owns the Consent. Typically an 'Operatør'

createdByOrgId
​integer · int64 · required

The organisation through which the consent was given

customerNumber
​integer · int64 · required

Customer number, a unique identifier for the customer.

customerRef
​string · required

Customer ref, a unique identifier for the customer within an organisation

givenConsentId
​integer · int64 · required

Given consent id.

countryCode
​string | null

The telephone number country code

email
​string | null

The customer's email

fromStopPlace
​string | null

The stop place where the customer’s journey started, in NeTEx format.

Example: NSR:StopPlace:12345
lineRef
​string | null

Reference to the customers journey line, in NeTEx format

Example: VYT:Line:L1
originalDatedServiceJourneyId
​string | null

Unique Id for a specific Service Journey, in NeTEx format with ENT as operator

Example: ENT:DatedServiceJourney:12345
telephoneNumber
​string | null

The customer's telephone number

toStopPlace
​string | null

The stop place where the customer’s journey ended, in NeTEx format.

Example: NSR:StopPlace:12345

ConsentPatchRequest

Request to set the valid to date for a consent
validTo
​string | null · date-time

If set, the date the consent is valid to. Set the date to deactivate the consent. If not set the consent is active from validFrom and forever after

Example: 2019-04-05T14:30:30+02:00

ConsentRequest

Adds a consent to a given consent base.
consentCode
​string · required

Consent code. Use the consent code + consent base version to identify the consent base

Example: ENT_INFO_SMS
isEmailSupported
​boolean · required

Whether the organisation supports email as a contact method

Example: true
isSmsSupported
​boolean · required

Whether the organisation supports SMS as a contact method

Example: false
organisationId
​integer · int64 · required

The organisation the consent is valid for.

consentBaseVersion
​integer | null · int32

Consent base version for adding a consent to a specific version. If not provided, the latest version is used.

Example: 1
validFrom
​string | null · date-time

If set, the date the consent is valid from. Can only be set to a date after consent base validFrom. If not set, the consent base is in draft mode.

Example: 2019-04-05T14:30:30+02:00
validTo
​string | null · date-time

If set, the date the consent is valid to. Set the date to deactivate the consent. Can only be set to a date before the consent base validTo. If not set the consent is active from validFrom and forever after.

Example: 2019-04-05T14:30:30+02:00

ConsentResponse

Consent response, includes the consent base
changedAt
​string · date-time · required

When the consent was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
​ConsentBaseResponse · required

Consent base

consentCode
​string · required

Code of the consent base

createdAt
​string · date-time · required

When the consent was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
id
​integer · int64 · required

Consent ID.

isEmailSupported
​boolean · required

Whether the organisation supports email as a contact method

isSmsSupported
​boolean · required

Whether the organisation supports SMS as a contact method

organisationId
​integer · int64 · required

The organisation the consent is valid for.

validFrom
​string | null · date-time

If set, the date the consent is valid from. Can only be set to a date after consent base validFrom. If not set, the consent base is in draft mode.

validTo
​string | null · date-time

If set, the date the consent is valid to. Set the date to deactivate the consent. Can only be set to a date before the consent base validTo. If not set the consent is active from validFrom and forever after.

ConsentTermsRequest

Text for terms in a specific language. Short descriptions should contain enough information to obtain consents, with the long description containing detailed information.
fullDescription
​string · required

Text describing the terms in detail. The text can contain MarkDown

languageCode
​string · required

ISO-639-3 languageCode.

Example: ENG
shortDescription
​string · required

Short text explaining the terms. The text can contain MarkDown

ConsentTermsResponse

Text for terms in a specific language
fullDescription
​string · required

Text describing the terms in detail. The text can contain MarkDown

languageCode
​string · required

ISO-639-3 language code. 3 characters

Example: ENG
shortDescription
​string · required

Short text explaining the terms. The text can contain MarkDown

ErrorMessage

ErrorMessage
errorCode
​integer · int32 · required

The error code.

longEnglish
​string · required

Long error message (English).

longNorwegian
​string · required

Long error message (Norwegian).

shortEnglish
​string · required

Short error message (English).

shortNorwegian
​string · required

Short error message (Norwegian).

GivenConsentBulkGetRequest

Request to get given consents for multiple customers by customer numbers or customer references.
customerNumbers
​array | null

Customer numbers to look up.

customerRefs
​array | null

Customer references to look up.

GivenConsentBulkUpdateRequest

Request to bulk update given consents for a customer. Adds a new given consent or replaces any existing given consent identified by the consent ID.
consentChoice
​boolean · required

Whether this consent has been approved or rejected.

Example: true
consentId
​integer · int64 · required

The id of the consent defining what and to whom the customer has consented.

Example: 12
customerNumber
​integer · int64 · required

The customer number

Example: 123456789
expirationDate
​string · date-time · required

When the consent expires. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
countryCode
​string | null

The telephone number country code provided with the consent

Example: +47
customerRef
​string | null

Customer reference. Note: If you do not provide a customer ref, the customer number will used as reference.

Example: abcd-1234
email
​string | null

The contact email provided with the consent.

Example: example@mail.com
fromStopPlace
​string | null

The stop place where the customer’s journey started, in NeTEx format.

Example: NSR:StopPlace:12345
lineRef
​string | null

Reference to the customers journey line, in NeTEx format

Example: VYT:Line:L1
originalDatedServiceJourneyId
​string | null

Unique Id for a specific Service Journey, in NeTEx format with ENT as operator

Example: ENT:DatedServiceJourney:12345
telephoneNumber
​string | null

The telephone number provided with the consent

Example: 87654321
toStopPlace
​string | null

The stop place where the customer’s journey ended, in NeTEx format.

Example: NSR:StopPlace:12345

GivenConsentPutRequest

Update a given consent
consentChoice
​boolean · required

Whether this consent has been approved or rejected.

Example: true
expirationDate
​string · date-time · required

When the consent expires. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
countryCode
​string | null

The telephone number country code provided with the consent

Example: +47
email
​string | null

The contact email provided with the consent.

Example: example@mail.com
fromStopPlace
​string | null

The stop place where the customer’s journey started, in NeTEx format.

Example: NSR:StopPlace:12345
lineRef
​string | null

Reference to the customers journey line, in NeTEx format

Example: VYT:Line:L1
originalDatedServiceJourneyId
​string | null

Unique Id for a specific Service Journey, in NeTEx format with ENT as operator

Example: ENT:DatedServiceJourney:12345
telephoneNumber
​string | null

The telephone number provided with the consent

Example: 87654321
toStopPlace
​string | null

The stop place where the customer’s journey ended, in NeTEx format.

Example: NSR:StopPlace:12345

GivenConsentRequest

Create a given consent for a customer
consentChoice
​boolean · required

Whether this consent has been approved or rejected.

Example: true
consentId
​integer · int64 · required

The id of the consent defining what and to whom the customer has consented.

Example: 12
customerNumber
​integer · int64 · required

Customer number.

Example: 123456789
expirationDate
​string · date-time · required

When the consent expires. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
countryCode
​string | null

The telephone number country code provided with the consent

Example: +47
customerRef
​string | null

Customer reference. Note: If you do not provide a customer reference, the customer number will used as reference.

Example: abcd-1234
email
​string | null

The contact email provided with the consent.

Example: example@mail.com
fromStopPlace
​string | null

The stop place where the customer’s journey started, in NeTEx format.

Example: NSR:StopPlace:12345
lineRef
​string | null

Reference to the customers journey line, in NeTEx format

Example: VYT:Line:L1
originalDatedServiceJourneyId
​string | null

Unique Id for a specific Service Journey, in NeTEx format with ENT as operator

Example: ENT:DatedServiceJourney:12345
telephoneNumber
​string | null

The telephone number provided with the consent

Example: 87654321
toStopPlace
​string | null

The stop place where the customer’s journey ended, in NeTEx format.

Example: NSR:StopPlace:12345

GivenConsentResponse

A consent given for a customer
changedAt
​string · date-time · required

When the consent was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
​ConsentResponse · required

Consent response, includes the consent base

consentChoice
​boolean · required

Whether this consent has been approved or rejected.

consentId
​integer · int64 · required

The id of the consent defining what the customer has consented.

createdAt
​string · date-time · required

When the consent was given. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
createdByOrgId
​integer · int64 · required

The organisation through which the consent was given

customerNumber
​integer · int64 · required

Customer number. Entur number unique across organisations

distributionChannel
​string · required

Distribution channel through which the consent was given.

expirationDate
​string · date-time · required

When the consent expires. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
id
​integer · int64 · required

Unique id for the given consent.

countryCode
​string | null

The telephone number country code provided with the consent

customerRef
​string | null

Customer reference. External reference, unique within an organisation

email
​string | null

The contact email provided with the consent.

fromStopPlace
​string | null

The stop place where the customer’s journey started, in NeTEx format.

Example: NSR:StopPlace:12345
lineRef
​string | null

Reference to the customers journey line, in NeTEx format

Example: VYT:Line:L1
originalDatedServiceJourneyId
​string | null

Unique Id for a specific Service Journey, in NeTEx format

Example: ENT:DatedServiceJourney:12345
telephoneNumber
​string | null

The telephone number provided with the consent

toStopPlace
​string | null

The stop place where the customer’s journey ended, in NeTEx format.

Example: NSR:StopPlace:12345

InternalDescriptionRequest

Contains internal description for a consent. Will not be shown to a customer
languageCode
​string · required

ISO-639-3 languageCode. 3 characters

Example: ENG
description
​string | null

A description for the partner administrating consents. If the request is an update and this is set to null, the description for the language will be deleted

InternalDescriptionResponse

Contains internal description for a consent. Will not be shown to customer
description
​string · required

A description for the partner administrating consents

languageCode
​string · required

ISO-639-3 language code. 3 characters

Example: ENG
Did you find what you were looking for?