Consents admin
Api for creating, fetching, modifying and deleting consents by admins
Find consents
Find consents filtered by given query parameters
query Parameters
organisationIdsFilter consents by organisation ids (comma separated).
consentCodesFilter consents by consent codes (comma separated).
versionsFilter consents by 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 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.
Add a consent
Add a consent to a consent base
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
Add a consent › Request Body
consentCodeConsent code. Use the consent code + consent base version to identify 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.
consentBaseVersionConsent base version for adding a consent to a specific version. If not provided, the latest version is used.
Add 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 all consent bases
List all available consent bases
query Parameters
includeAllVersionsWhether or not to include all versions of all consents bases. If set to false, will only return the currently active versions. (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 consent bases › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Create a consent base
Create a consent base
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 consent base › Request Body
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
consentCodeConsent 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.
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe 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.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent bases across organisations.
Create a consent base › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
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.
Update a draft consent
Update a consent by its id. Only consents in DRAFT state can be updated.
path Parameters
idThe id of the consent to update
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
Update a draft consent › Request Body
consentCodeConsent code. Use the consent code + consent base version to identify 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.
consentBaseVersionConsent base version for adding a consent to a specific version. If not provided, the latest version is used.
Update a draft 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.
Delete a consent
Delete a consent by its id.
path Parameters
idThe id of the consent to delete
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
Delete a consent › Responses
No Content
Update an active consent
Update the valid to for an active consent. This is the only thing that can be changed after a consent is active. If you want to change other fields you have to create a new consent.
path Parameters
idThe id of the consent to update
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
Update an active consent › Request Body
validToIf 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
Update an active 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 current version of consent base
Returns the currently active version of consent base. Returns 404 if the are no active versions.
path Parameters
consentCodeThe consent code of the consent base to find.
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 current version of consent base › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Delete a consent base
Delete a consent base and all it's versions
path Parameters
consentCodeThe consent code of the consent base to delete
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
Delete a consent base › Responses
No Content
Find all consent base versions
Returns a list of all versions for the consent base
path Parameters
consentCodeThe consent code of the consent base for which to find versions.
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 consent base versions › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Create a new version and update values for a consent base.
Create a new version and update values for a consent base.
path Parameters
consentCodeThe consent code of the consent base to update.
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 new version and update values for a consent base. › Request Body
Consent description and terms in multiple languages. Supports MarkDown
validToIf 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
validFromThe 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.
Internal description, describing what the usecases are for the consent
orgNameSubstitutionPatternThe pattern on which to perform substitution within consentDescription and consentTerms. Facilitates reusable consents across organisations.
Create a new version and update values for a consent base. › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Find version of a consent base
Find a specific version of a consent base
path Parameters
consentCodeThe consent code of the consent base for which to to find a version.
versionThe version to find
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 version of a consent base › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Update a consent base version.
Update a consent base version by its consent code. Note: you can only edit draft versions of consent bases. If you want to update an active consent base, you need to create a new version.
path Parameters
consentCodeThe consent code of the consent base to update.
versionThe version to update
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
Update a consent base version. › Request Body
Consent description and terms in multiple languages. Supports MarkDown
validToIf 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
validFromThe 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.
Internal description, describing what the usecases are for the consent
orgNameSubstitutionPatternThe pattern on which to perform substitution within consentDescription and consentTerms. Facilitates reusable consents across organisations.
Update a consent base version. › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations
Delete a consent base version
Delete a consent base version
path Parameters
consentCodeThe consent code of the consent base to delete version for.
versionThe version to delete
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
Delete a consent base version › Responses
No Content
Patch a consent base version
Patch an active consent base version.
path Parameters
consentCodeThe consent code of the consent base to patch version for.
versionThe version to patch
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
Patch a consent base version › Request Body
Terms to add. Only new languages can be added to existing terms. Updating terms for an existing language will result in an exception.
validToIf 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
The internal description. Is only exposed for admin endpoints
Patch a consent base version › Responses
OK
Consent terms with long and short description in multiple languages. The descriptions can contain MarkDown
versionThe consent base version
changedAtWhen the consent base was last changed. ISO 8601 date format
createdAtWhen the consent base was created. ISO 8601 date format
consentCodeConsent code used to identify the consent base
validToIf 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.
validFromIf 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.
consentOwnerOrgIdThe organisation that owns the consent base. If not set, the consent base can be used by all organisations.
Internal description, describing the use cases for the consent base
orgNameSubstitutionPatternThe pattern on which to perform substitution within terms. Facilitates reusable consent basess across organisations