Consents client
Api for creating, fetching, modifying and deleting given consents by clients
Find all consents
Find all consents
query Parameters
organisationIdsFilter consents by organisation ids (comma separated). If you're a partner, this will be filled out from your authentication token. Example: organisationIds=1,20
consentCodesFilter consents by consent base codes (comma separated). Example: consentCodes=ENT_INFO_SMS,ENT_INFO_EMAIL
versionsFilter consents by consent base versions (comma separated). You can also use the keywords ALL or CURRENT. |Example: versions=1,2 or versions=CURRENT
includeInactiveWhether or not to include inactive consents (Default: false)
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find all consents › Responses
OK
idConsent ID.
changedAtWhen the consent was last changed. ISO 8601 date format
createdAtWhen the consent was created. ISO 8601 date format
Consent base
consentCodeCode of the consent base
isSmsSupportedWhether the organisation supports SMS as a contact method
organisationIdThe organisation the consent is valid for.
isEmailSupportedWhether the organisation supports email as a contact method
validToIf 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.
validFromIf 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.
Get a consent
Get a consent by its id.
path Parameters
idThe id of the consent 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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Get a consent › Responses
OK
idConsent ID.
changedAtWhen the consent was last changed. ISO 8601 date format
createdAtWhen the consent was created. ISO 8601 date format
Consent base
consentCodeCode of the consent base
isSmsSupportedWhether the organisation supports SMS as a contact method
organisationIdThe organisation the consent is valid for.
isEmailSupportedWhether the organisation supports email as a contact method
validToIf 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.
validFromIf 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.
Find given consents
Find given consents filtered by given query parameters.
query Parameters
originalDatedServiceJourneyIdsSearch given consents by originalDatedServiceJourneyId (comma separated). Example: originalDatedServiceJourneyIds=ENT:DatedServiceJourney:XXXXX,ENT:DatedServiceJourney:YYYYY
lineRefSearch given consents by lineRef (comma separated). Example: lineRef=XXX:Line:YY,XXX:Line:ZZ
stopPlacesSearch given consents by stopPlaces (includes start and end stop) (comma separated). Example: stopPlaces=NSR:StopPlace:XXXXX,NSR:StopPlace:YYYY
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find given consents › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Create a given consent.
Create a given consent.
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Create a given consent. › Request Body
consentIdThe id of the consent defining what and to whom the customer has consented.
consentChoiceWhether this consent has been approved or rejected.
customerNumberCustomer number.
expirationDateWhen the consent expires. ISO 8601 date format
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. Note: If you do not provide a customer reference, the customer number will used as reference.
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format with ENT as operator
Create a given consent. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Bulk update given consents.
Bulk update given consents for a customer. Adds new given consents or replaces existing given consents for the specified consent IDs. |Consents not included in the request remain unchanged.
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Bulk update given consents. › Request Body
consentIdThe id of the consent defining what and to whom the customer has consented.
consentChoiceWhether this consent has been approved or rejected.
customerNumberThe customer number
expirationDateWhen the consent expires. ISO 8601 date format
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. Note: If you do not provide a customer ref, the customer number will used as reference.
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format with ENT as operator
Bulk update given consents. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Find given consents by customer references or customer numbers.
Find given consents by the provided customer references or customer numbers, filtered by organisation. If both customer number and customer references are provided Bad Request will be returned
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find given consents by customer references or customer numbers. › Request Body
customerRefsCustomer references to look up.
customerNumbersCustomer numbers to look up.
Find given consents by customer references or customer numbers. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Find a given consent.
Find a given consent defined by its id.
path Parameters
givenConsentIdHeaders
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find a given consent. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Update a given consent.
Update a given consent.
path Parameters
givenConsentIdHeaders
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Update a given consent. › Request Body
consentChoiceWhether this consent has been approved or rejected.
expirationDateWhen the consent expires. ISO 8601 date format
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format with ENT as operator
Update a given consent. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Delete given consent.
Delete a given consent
path Parameters
givenConsentIdHeaders
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Delete given consent. › Responses
No Content
Find all by customer reference.
Find all given consents associated with a customer reference.
path Parameters
customerRefHeaders
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find all by customer reference. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format
Find all by customer number.
Find all given consents by a customer number.
path Parameters
customerNumberHeaders
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> for companies, and <personal name>-<application> for individuals.
X-Correlation-IdCorrelation id
Find all by customer number. › Responses
OK
idUnique id for the given consent.
Consent response, includes the consent base
changedAtWhen the consent was last changed. ISO 8601 date format
consentIdThe id of the consent defining what the customer has consented.
createdAtWhen the consent was given. ISO 8601 date format
consentChoiceWhether this consent has been approved or rejected.
createdByOrgIdThe organisation through which the consent was given
customerNumberCustomer number. Entur number unique across organisations
expirationDateWhen the consent expires. ISO 8601 date format
distributionChannelDistribution channel through which the consent was given.
emailThe contact email provided with the consent.
lineRefReference to the customers journey line, in NeTEx format
countryCodeThe telephone number country code provided with the consent
customerRefCustomer reference. External reference, unique within an organisation
toStopPlaceThe stop place where the customer’s journey ended, in NeTEx format.
fromStopPlaceThe stop place where the customer’s journey started, in NeTEx format.
telephoneNumberThe telephone number provided with the consent
originalDatedServiceJourneyIdUnique Id for a specific Service Journey, in NeTEx format