Properties

A property is a configuration that will be used for your reports. It contains all the information regarding the website to scan, the number of pages to visit, the country from where the scan will run, etc...

Create a Property

You can create a property by calling the POST /reports/compliances/properties endpoint.

Please find an example of the body of a property

{
    "website": "https://didomi.io",
    "name": "My Didomi Website",
    "schedule": null, // One time scan
    "pages_count": 10,
    "country": "fr",
    "enabled": true,
    "filters": [],
    "disable_anti_bot": false,
    "login": {
        "enabled": false
    },
    "scenarios": [
        {
            "enabled": true,
            "type": "accept_all",
            "scenario_actions": [
                {
                    "type": "accept",
                    "order": 0
                }
            ]
        },
        {
            "enabled": true,
            "type": "refuse_all",
            "scenario_actions": [
                {
                    "type": "refuse",
                    "order": 0
                }
            ]
        },
        {
            "enabled": true,
            "type": "no_actions",
            "scenario_actions": []
        }
    ]
}

For more information, please check the API documentation.

Retrieve a Property

You can retrieve a property by calling the GET /reports/compliances/properties/{id} endpoint.

As mentioned in the API documentation, you can get the summary of its latest reports by adding with[]=latest_reports as query params.

GET /reports/compliances/properties/{{id}}?organization_id={{organization_id}}&with[]=latest_reports

Retrieve Properties

You can retrieve a list of properties by calling the GET /reports/compliances/properties endpoint.

As mentioned in the API documentation, properties can be filtered in many ways. For example, if you want to retrieve all properties created in January 2025.

GET /reports/compliances/properties?organization_id={{organization_id}}&created_at[$gte]=2025-01-01&created_at[$lte]=2025-01-31

Edit a Property

To edit a property, you will need the property ID. Edit a property by calling the PATCH /reports/compliances/properties endpoint.

Every time a property is edited, a new report will run. You can omit this by setting skip_report to true in your query param.

Delete a Property

To delete a property, you will need the property ID. Delete a property by calling the DELETE /reports/compliances/properties endpoint.

Last updated