This API is currently pending release and will be available shortly.
Add competitor suggestions to an Insites audit
Method: POST
Request body should be JSON encoded, and can include the following fields:
Property | Definition | Required |
competitor_suggestions | Array – An array of competitor suggestion objects (see below) | Yes |
Competitor suggestion
Each competitor suggestion object should follow the following structure:
Property | Definition | Required |
name | String – Name of the competitor | Yes |
phone | String – Phone number of the competitor | No |
address | String – Address of the competitor | No |
city | String – City of the competitor | No |
state | String – State or county of the competitor | No |
country_code | String – ISO 2 letter country code of the competitor | No |
zip | String – Zip code of the competitor | No |
url | String – URL / web address of the competitor | No |
latitude | Float – Latitude GPS coordinate of the competitor | No |
longitude | Float – Longitude GPS coordinate of the competitor | No |
Example
curl "https://api.insites.com/api/v1/report/[REPORT ID]/competitor-suggestions" \
--header "api-key:[YOUR API KEY]" \
--header "Content-Type: application/json" \
--data '{
"competitor_suggestions": [
{
"name": "Cheval Blanc by Peter Knogl",
"phone": "+41 61 260 50 07",
"address": "Blumenrain 8",
"city": "Basel",
"state": "Basel",
"country_code": "CH",
"zip": "4001",
"url": "https://www.lestroisrois.com/en/cheval-blanc-by-peter-knogl",
"latitude": 47.5596,
"longitude": 7.5886
}
]
}'
Expected response
If successful, you would expect a 201 response.
All possible responses
Code | Reason |
201 | Competitor suggestions stored |
422 | Malformed competitor or competitor(s) |