Entur Developer
Consents API

Api for creating, fetching, modifying and deleting consents by admins


GET
https://api.entur.io/customers/v2/consents
/admin/consents/{id}

Get a consent by its id.

Get a consent › path Parameters

id
​integer · int64 · required · style: simple

The id of the consent to retrieve

Get a consent › 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

Get a consent › Responses

OK

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 · 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 · 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.


PUT
https://api.entur.io/customers/v2/consents
/admin/consents/{id}

Update a consent by its id. Only consents in DRAFT state can be updated.

Update a draft consent › path Parameters

id
​integer · int64 · required · style: simple

The id of the consent to update

Update a draft consent › 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

Update a draft consent › Request Body

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 · int32

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

Example: 1
validFrom
​string · 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 · 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

Update a draft consent › Responses

OK

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 · 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 · 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.


DELETE
https://api.entur.io/customers/v2/consents
/admin/consents/{id}

Delete a consent by its id.

Delete a consent › path Parameters

id
​integer · int64 · required · style: simple

The id of the consent to delete

Delete a consent › 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

Delete a consent › Responses

No Content

No data returned

PATCH
https://api.entur.io/customers/v2/consents
/admin/consents/{id}

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.

Update an active consent › path Parameters

id
​integer · int64 · required · style: simple

The id of the consent to update

Update an active consent › 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

Update an active consent › Request Body

Request to set the valid to date for a consent
validTo
​string · 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

Update an active consent › Responses

OK

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 · 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 · 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.


GET
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions/{version}

Find a specific version of a consent base

consentCode
​string · required · style: simple

The consent code of the consent base for which to to find a version.

version
​integer · int32 · required · style: simple

The version to find

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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

PUT
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions/{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.

consentCode
​string · required · style: simple

The consent code of the consent base to update.

version
​integer · int32 · required · style: simple

The version to update

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

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

​InternalDescriptionRequest[]

Internal description, describing what the usecases are for the consent

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

DELETE
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions/{version}

Delete a consent base version

consentCode
​string · required · style: simple

The consent code of the consent base to delete version for.

version
​integer · int32 · required · style: simple

The version to delete

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

No Content

No data returned

PATCH
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions/{version}

Patch an active consent base version.

consentCode
​string · required · style: simple

The consent code of the consent base to patch version for.

version
​integer · int32 · required · style: simple

The version to patch

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

Request to update updatable fields after the consent base is active
​InternalDescriptionRequest[]

The internal description. Is only exposed for admin endpoints

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 · 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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

Find consents

GET
https://api.entur.io/customers/v2/consents
/admin/consents

Find consents filtered by given query parameters

Find consents › query Parameters

organisationIds
​integer[] · style: form · explode: true

Filter consents by organisation ids (comma separated).

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

Filter consents by consent codes (comma separated).

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

Filter consents by versions (comma separated). You can also use the keywords ALL or CURRENT. Example: versions=1,2 or versions=CURRENT

Default: ["CURRENT"]
includeInactive
​boolean · style: form · explode: true

Whether or not to include inactive consents (default: false)

Find consents › 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

Find consents › Responses

OK

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 · 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 · 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.


POST
https://api.entur.io/customers/v2/consents
/admin/consents

Add a consent to a consent base

Add a consent › 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

Add a consent › Request Body

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 · int32

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

Example: 1
validFrom
​string · 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 · 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

Add a consent › Responses

OK

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 · 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 · 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.


GET
https://api.entur.io/customers/v2/consents
/admin/consent-bases

List all available consent bases

includeAllVersions
​boolean · style: form · explode: true

Whether or not to include all versions of all consents bases. If set to false, will only return the currently active versions. (default: false)

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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

POST
https://api.entur.io/customers/v2/consents
/admin/consent-bases

Create a consent base

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

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 · 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.

​InternalDescriptionRequest[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

GET
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions

Returns a list of all versions for the consent base

consentCode
​string · required · style: simple

The consent code of the consent base for which to find versions.

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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

POST
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}/versions

Create a new version and update values for a consent base.

consentCode
​string · required · style: simple

The consent code of the consent base to update.

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

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

​InternalDescriptionRequest[]

Internal description, describing what the usecases are for the consent

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

GET
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}

Returns the currently active version of consent base. Returns 404 if the are no active versions.

consentCode
​string · required · style: simple

The consent code of the consent base to find.

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

OK

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 · int64

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

​InternalDescriptionResponse[]

Internal description, describing the use cases for the consent base

orgNameSubstitutionPattern
​string

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

Example: [ORG]
validFrom
​string · 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 · 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

DELETE
https://api.entur.io/customers/v2/consents
/admin/consent-bases/{consentCode}

Delete a consent base and all it's versions

consentCode
​string · required · style: simple

The consent code of the consent base to delete

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

No Content

No data returned

Did you find what you were looking for?