Returns status code

200

Example Response

{
    "goalProfileId": "V8U",
    "name": "goal marketing 1",
    "domainUrl": "http://yourdomain.com",
    "createdOn": "2014-09-29 12:25:55",
    "javascript": "Here goes some javascript code that must be placed on your website"
}

Returns status code

200

Request url

/goal-profiles?&fields=name&sort[createdOn]=desc&page=4&perPage=30

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
name*
createdOn[from]Y-m-d
createdOn[to]Y-m-d
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
nameasc,desc
createdOnasc,desc
pageintegerSpecify which page of results return.
perPageintegerSpecify how many results per page should be returned

Example Response

[
    {
        "goalProfileId": "V8U",
        "name": "goal marketing 1",
        "domainUrl": "http://yourdomain.com",
        "createdOn": "2014-09-29 12:25:55"
    },
    {
        "goalProfileId": "9ukl",
        "name": "goal marketing 2",
        "domainUrl": "http://yourseconddomain.com",
        "createdOn": "2014-01-09 10:25:33"
    }
]

Returns status code

201

Example Request Body

{
    "name": "new goal profile",
    "domainUrl": "http://url_to_your_website.com"
}

Body params

Field nameField typeField description
name (required)stringName of the profile
domainUrl (required)stringDomain url to your website

Example Response

{
    "goalProfileId": "V8U",
    "name": "goal marketing 1",
    "domainUrl": "http://yourdomain.com",
    "createdOn": "2014-09-29 12:25:55",
    "javascript": "Here goes some javascript code that must be placed on your website"
}

Possible Errors


Returns status code

204

Possible Errors


Returns status code

200

Example Request Body

{
    "name": "new goal profile",
    "domainUrl": "http://url_to_your_website.com"
}

Body params

Field nameField typeField description
name (required)stringName of the profile
domainUrl (required)stringDomain url to your website

Example Response

{
    "goalProfileId": "V8U",
    "name": "goal marketing 1",
    "domainUrl": "http://yourdomain.com",
    "createdOn": "2014-09-29 12:25:55",
    "javascript": "Here goes some javascript code that must be placed on your website"
}

Possible Errors


Returns status code

200

Example Response

[
    {
        "id": "Ioas",
        "status": "disabled",
        "urlMatchType": "exact",
        "protocol": "http",
        "url": "webtests.pl/",
        "type": "dynamic",
        "params": [
            {
                "id": "FRwa",
                "param": "param_0",
                "name": "first parameter name"
            },
            {
                "id": "dsaA",
                "param": "param_1",
                "name": "second parameter name"
            },
            {
                "id": "Khio",
                "param": "param_2",
                "name": "fird parameter name"
            }
        ]
    }
]

Returns status code

200

Request url

/goal-profiles/V/goals?&fields=name&sort[url]=desc

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
name*
typedynamic | static
statusenabled | disabled
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
nameasc,desc
urlasc,desc
typeasc,desc
statusasc,desc
pageintegerSpecify which page of results return.
perPageintegerSpecify how many results per page should be returned

Example Response

[
    {
        "goalId": "pVA",
        "href": "http://api.getresponse.new/v3/goal-profiles/n/goals/pVA",
        "name": "test goal 1",
        "url": "http://yourwebsite1.com/",
        "status": "disabled",
        "results": "0",
        "value": "0"
    },
    {
        "goalId": "pVb",
        "href": "http://api.getresponse.new/v3/goal-profiles/n/goals/pVb",
        "name": "test goal 2",
        "url": "http://yourwebsite2.com/",
        "status": "enabled",
        "results": "3",
        "value": "10"
    }
]

Returns status code

201

Example Request Body

{
    "name": "new goal",
    "status": "disabled",
    "urlMatchType": "exact",
    "protocol": "http",
    "url": "/index.html",
    "type": "dynamic",
    "params": [
        {
            "name": "first param name"
        },
        {
            "name": "second param name"
        }
    ]
}

Body params

Field nameField typeField description
name (required)stringName of the goal
status (required)stringis goal enabled. Possible values: enabled, disabled
urlMatchType (required)string Determine how the Goal will be matched on the domain. Possible values: exact, broad
protocol (required)stringDetermines whether the assigned URL is protected or not. Possible values: http, https
url (required)stringThe exact address to be tracked.
type (required)stringGoal type. Possible values: static, dynamic.
params (required)arrayParameters to be counted
Field nameField typeField description
namestringName of the parameter. Required when goal type is set to 'dynamic'.
valuestringValue of the parameter. Required when goal type is set to 'static'.

Example Response

[
    {
        "id": "Ioas",
        "name": "new goal",
        "status": "disabled",
        "urlMatchType": "exact",
        "protocol": "http",
        "url": "/index.html",
        "type": "dynamic",
        "params": [
            {
                "id": "FRwa",
                "param": "param_0",
                "name": "first param name",
                "value": ""
            },
            {
                "id": "dsaA",
                "param": "param_1",
                "name": "second param name",
                "value": ""
            }
        ]
    }
]

Possible Errors


Returns status code

204

Possible Errors


Returns status code

201

Example Request Body

{
    "name": "goal name",
    "status": "enabled",
    "urlMatchType": "exact",
    "protocol": "http",
    "url": "/index.html",
    "type": "static",
    "params": [
        {
            "value": "12"
        }
    ]
}

Body params

Field nameField typeField description
name (required)stringName of the goal
status (required)stringis goal enabled. Possible values: enabled, disabled
urlMatchType (required)string Determine how the Goal will be matched on the domain. Possible values: exact, broad
protocol (required)stringDetermines whether the assigned URL is protected or not. Possible values: http, https
url (required)stringThe exact address to be tracked.
type (required)stringGoal type. Possible values: static, dynamic.
params (required)arrayParameters to be counted
Field nameField typeField description
namestringName of the parameter. Required when goal type is set to 'dynamic'.
valuestringValue of the parameter. Required when goal type is set to 'static'.

Example Response

[
    {
        "id": "Ioas",
        "name": "goal name",
        "status": "enabled",
        "urlMatchType": "exact",
        "protocol": "http",
        "url": "/index.html",
        "type": "static",
        "params": [
            {
                "id": "FRwa",
                "param": "param_0",
                "name": "static",
                "value": "1"
            }
        ]
    }
]