Get started
API Endpoint https://app.gaannotations.com
GAannotations provide API for all actions over annotations
To use this API, you need an API key. Please login to dashboard to get your own API key.
User Details
# Here is a curl example
curl --request GET \
--url https://app.gaannotations.com/api/v1/user \
--header 'Authorization: Bearer your_api_key'
To get characters you need to make a GET
call to the following url :
https://app.gaannotations.com/api/v1/user
Response 200 OK
Result example :
{
"id": 1,
"name": "ABC",
"email": "abc@def.gh",
"email_verified_at": null,
"created_at": null,
"updated_at": "2020-10-29T09:51:08.000000Z",
"price_plan_id": 2,
"price_plan_expiry_date": "2020-11-29",
"annotations_count": 0
}
QUERY PARAMETERS
None
Annotation List
# Here is a curl example
curl --request GET \
--url https://app.gaannotations.com/api/v1/annotations \
--header 'Authorization: Bearer your_api_key'
To get characters you need to make a GET
call to the following url :
https://app.gaannotations.com/api/v1/annotations
Response 200 OK
Result example :
{
"annotations": [
{
"_id": 1,
"category": "Sales Event",
"eventSource": {
"name": "Black Friday"
},
"url": "https://app.gaannotations.com",
"description": "Black Friday Deals 2020",
"highlighted": false,
"publishDate": "2020-11-27UTC00:00:000",
}
]
}
QUERY PARAMETERS
None
Add Annotation
# Here is a curl example
curl --request POST \
--url https://app.gaannotations.com/api/v1/annotations \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data category=Sales Event \
--data event_name=Black Friday \
--data google_analytics_property_id[]=3 \
--data url=https://app.gaannotations.com \
--data 'description=Black Friday Deals 2020' \
--data show_at=2020-11-27 \
To post characters you need to make a POST
call to the following url :
https://app.gaannotations.com/api/v1/annotations
Response 201 Created
Result example :
{
"annotation": {
"category": "Sales Event",
"event_name": "Black Friday",
"url": "https://app.gaannotations.com",
"description": "Black Friday Deals 2020",
"show_at": "2020-11-27",
"user_id": 1,
"updated_at": "2020-10-29T10:11:19.000000Z",
"created_at": "2020-10-29T10:11:19.000000Z",
"id": 71
}
}
QUERY PARAMETERS
None
FORM PARAMETERS
Field | Type | Description |
---|---|---|
category | String | [required] Annotation Category |
event_name | String | [required] Annotation's Event_name |
url | mediumText | [required] Annotation's url |
description | mediumText | [required] Annotation's description |
show_at | date | [optional] Annotation's show_at date from which it will show on google analytics |
google_analytics_property_id[] | int | [optional] Annotation's google analytics property id with which it will be attached. You can get IDs for API of your google analytics properties from here. You can add multiple fields of this name in your request for multiple properties of same annotation. |
Change Annotation
# Here is a curl example
curl --request PUT \
--url https://app.gaannotations.com/api/v1/annotations/id \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data category=Sales Event \
--data event_name=Black Friday \
--data google_analytics_property_id[]=4 \
--data url=https://app.gaannotations.com \
--data 'description=Black Friday Deals 2020' \
--data show_at=2020-11-27 \
To get characters you need to make a PUT
call to the following url :
https://app.gaannotations.com/api/v1/annotations/id
Response 200 OK
Result example :
{
"annotation": {
"id": 71,
"user_id": 1,
"category": "Sales Event",
"event_name": "Black Friday",
"url": "https://app.gaannotations.com",
"description": "Black Friday Deals 2020",
"show_at": "2020-11-27",
"created_at": "2020-10-29T10:11:19.000000Z",
"updated_at": "2020-10-29T10:17:25.000000Z",
"is_enabled": 1
}
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
id | Int | [required] id of specific annotation you want to update |
FORM PARAMETERS
Field | Type | Description |
---|---|---|
category | String | [required] Annotation Category updated value |
event_name | String | [required] Annotation's Event_name updated value |
url | mediumText | [required] Annotation's url updated value |
description | mediumText | [required] Annotation's description updated value |
show_at | date | [optional] Annotation's show_at date from which it will show on google analytics updated value |
google_analytics_property_id[] | int | [optional] Annotation's google analytics property id with which it will be attached. You can get Ids of your google analytics properties from here. You can add multiple fields of this name in your request for multiple properties of same annotation. |
Delete Annotation
# Here is a curl example
curl --request DELETE \
--url https://app.gaannotations.com/api/v1/annotations/id \
--header 'Authorization: Bearer your_api_key' \
--header 'Content-Type: application/x-www-form-urlencoded'
To get characters you need to make a DELETE
call to the following url :
https://app.gaannotations.com/api/v1/annotations/id
Response 204
Result example :
{
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
id | Int | [required] id of specific annotation you want to Delete |