Area of interest
This functionality allows your customers to set their area of interest up from your interests list. Thats list has to be defined in your administration panel.
Get interests
Return his list of interests to a user.
Example
https://wsmedia.tlsecure.com/api/json/00000/customer/interest
Request
HTTP Verb : GET
URL : http://{WS_URL}/RestWSDF4/{returnType}/{domainCode}/customer/interest
Parameters | Location | Type | Required | Default | Accepted |
---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
Response
Success
{
"response": {
"success": true
"code": 0
"message": "get interests"
"object": {
"interests": {
"interest": [3]
0: {
"id": 1
"name": "Science"
}
1: {
"id": 5
"name": "Economy"
}
2: {
"id": 6
"name": "Business"
}
}
}
}
}
Error
{
"response": {
"success": false
"code": 10
"message": "no interests chosen"
}
}
Codelist
Code | Success | Message |
---|---|---|
0 | v | get interests |
1 |
| domaincode malformed |
2 |
| connexion error |
3 |
| token is empty |
4 |
| no token with that key |
5 |
| invalid token |
10 |
| no interests chosen |
99 |
| uncatched exception |
Set interest
Add an interest in the customer's list.
Example
https://wsmedia.tlsecure.com/api/json/00000/customer/interest/1
Request
HTTP Verb : POST
URL : http://{WS_URL}/RestWSDF4/{returnType}/{domainCode}/customer/interest/{interest}
Parameters | Location | Type | Required | Default | Accepted |
---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
interest | Path | Integer | v |
|
Response
Success
{
"response": {
"success": true
"message": "interest added"
"object": {
"interest": {
"id": 1
"name": "Health"
}
}
}
}
Error
Codelist
Code | Success | Message |
---|---|---|
0 | v | interest added |
1 |
| domaincode malformed |
2 |
| connexion error |
3 |
| token is empty |
4 |
| no token with that key |
5 |
| invalid token |
9 |
| {param} is not {type} {(or undefined)} |
10 |
| interest doesn't exist |
11 |
| already chosen by user |
99 |
| uncatched exception |
Remove interest
Remove an interest from the customer's list.
Example
https://wsmedia.tlsecure.com/api/json/00000/customer/interest/1
Request
HTTP Verb : DELETE
URL : http://{WS_URL}/RestWSDF4/{returnType}/{domainCode}/customer/interest/{interest}
Parameters | Location | Type | Required | Default | Accepted |
---|---|---|---|---|---|
token | Header | String(26) | v |
|
|
interest | Path | Integer | v |
|
Response
Success
Error
Codelist
Code | Success | Message |
---|---|---|
0 | v | interest added |
1 |
| domaincode malformed |
2 |
| connexion error |
3 |
| token is empty |
4 |
| no token with that key |
5 |
| invalid token |
9 |
| {param} is not {type} {(or undefined)} |
10 |
| interest doesn't exist |
11 |
| interest had not been chosen by user |
99 |
| uncatched exception |