Goals

GET https://hootmaps.com/api/goals/
curl --request GET \
--url 'https://hootmaps.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
Paramètres Détails Description
website_id Facultatif Entier
type Facultatif Chaîne Valeurs autorisées : pageview , custom
search Facultatif Chaîne La chaîne de recherche
search_by Facultatif Chaîne Dans quel champ effectuez-vous la recherche. Les valeurs autorisées sont : name, path, key
order_by Facultatif Chaîne Quel champ utiliser pour trier les résultats. Les valeurs autorisées sont : goal_id, last_datetime, datetime, name, path, key
order_type Facultatif Chaîne L'ordre des résultats. Les valeurs autorisées sont : ASC pour un ordre croissant, et DESC pour un ordre décroissant
page Facultatif Entier Le numéro de page à partir duquel vous souhaitez obtenir des résultats. La valeur par défaut est 1
results_per_page Facultatif Entier Combien de résultats souhaitez-vous par page. Les valeurs autorisées sont : 10 , 25 , 50 , 100 , 250 , 500 , 1000. La valeur par défaut est 25
{
    "data": [
        {
            "id": 1,
            "website_id": 1,
            "user_id": 1,
            "key": "123456789",
            "type": "custom",
            "path": null,
            "name": "Example",
            "datetime": "2026-03-12 09:28:21",
            "last_datetime": null
        },
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://hootmaps.com/api/goals?page=1",
        "last": "https://hootmaps.com/api/goals?page=1",
        "next": null,
        "prev": null,
        "self": "https://hootmaps.com/api/goals?page=1"
    }
}
GET https://hootmaps.com/api/goals/{goal_id}
curl --request GET \
--url 'https://hootmaps.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "website_id": 1,
        "user_id": 1,
        "key": "123456789",
        "type": "custom",
        "path": null,
        "name": "Example",
        "datetime": "2026-03-12 09:28:21",
        "last_datetime": null
    }
}
POST https://hootmaps.com/api/goals
Paramètres Détails Description
website_id Requis Entier -
type Requis Chaîne Valeurs autorisées : pageview , custom
name Requis Chaîne -
path Facultatif Chaîne Available when: type = pageview
key Facultatif Chaîne -
curl --request POST \
--url 'https://hootmaps.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'chart_datetime=2026-03-12 09:28:21' \
{
    "data": {
        "id": 1
    }
}
POST https://hootmaps.com/api/goals/{goal_id}
Paramètres Détails Description
website_id Facultatif Entier -
type Facultatif Chaîne Valeurs autorisées : pageview , custom
name Facultatif Chaîne -
path Facultatif Chaîne Available when: type = pageview
key Facultatif Chaîne -
curl --request POST \
--url 'https://hootmaps.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
{
    "data": {
        "id": 1
    }
}
DELETE https://hootmaps.com/api/goals/{goal_id}
curl --request DELETE \
--url 'https://hootmaps.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \