Configurations
A notice configuration determines the full behavior of a consent notice, including the platform that it applies to, its targeted properties, and all the configuration options for the notice (texts, buttons, etc.).
For a given notice, the full history of configurations are kept:
The current draft configuration that is not yet applied to the notice and can be modified to prepare for future publishing.
The previous published configurations that are kept for audit and compliance purposes and cannot be modified.
The /widgets/notices/configs
endpoint of the API exposes the notice configurations managed by Didomi for your organizations. For a full reference of the endpoint and the resources that it returns, visit https://api.didomi.io/docs/.
Draft configuration
The notice configuration that can be modified before publishing is called "draft" and is the notice configuration that is not yet deployed. If you want to modify the configuration of your notice on your websites/apps, you must first modify the draft configuration and then publish it.
Get the current draft configuration for a notice
The current draft configuration for a notice is marked with null
as the value for its deployed_at
field.
To identify the current draft configuration, get all the notice configurations and find the one that has deployed_at = null
.
Example
In this example, the second configuration (with ID 2fcjz7Cw
) is the current draft and can be modified to prepare for publishing.
See the API documentation for more details on using our API to get notice configurations.
Modify the draft configuration
To update the configuration of your consent notice, you must update the draft configuration and then publish it. To update the draft configuration send a PATCH
request to the current draft configuration.
Example
To modify the draft configuration, send a PATCH
request with an updated configuration. Example for switching the notice to a mobile notice with a consent duration of 6 months:
See the API documentation for more details on using our API to modify a configuration.
What is the config field?
The full configuration of a notice is split between the config
field and the other fields on the configuration object:
The
config
field follows the format documented for the configuration of the SDKs in our SDKs configuration section.The other fields of the configuration are documented in our API documentation.
Didomi is in the process of transforming the config
field into separate fields on configurations and will do so in a backward-compatible manner. The config
field will eventually be deprecated as it proved complex to work with.
Published configurations
Configurations that are already published (or "deployed") are marked with their publishing date in the deployed_at
field. A configuration that is already published cannot be modified so that it can be used as proof of how consent was collected at a given time.
Publish a draft configuration
Only draft configurations can be published. A draft configuration is marked as deployed once it is published and cannot be published or modified anymore.
To publish the current draft configuration, create a deployment for that configuration by sending a POST /widgets/notices/deployments
request for that specific configuration.
After a configuration is published, the publishing date is set in its deployed_at
field and that configuration cannot be modified or published anymore. A new draft configuration is automatically created for the notice as a copy of the latest published configuration. To make further changes to the notice configuration, get the new draft configuration and modify it.
Example
The production_config_id
should be the ID of the draft config you are publishing. message
is a text field that can be used to indicate information on what changes are included in your deployment.
See the API documentation for more details on using our API to publish a configuration.
Last updated