Feedback form

We recommend you to use the feedback form every time you use the business listings API. It will help our partners avoid receiving information from their users, if it concerns the 2GIS data. It will help us promptly update the content to make it even more accurate.

The form has been implemented in a neutral style, so it can be used in almost any design. This is what it will look like:
«Found data inaccuracy? Please let us know» or «Company not found? Please let us know»

Adding the form

You should place the following code in the head tag:

<script src=http://feedback.api.2gis.ru/js/dg-api-feedback-loader.js" type=“text/javascript”></script>

There are two cases when it is recommended to show a link to the form.

1. Inaccuracy in the data

It is recommended to show a link to the form in the company card.

The display is carried out by calling the DG.feedback.showPopupDataError(FilialID, FilialName, FilialAddress) method, where
FilialIDstring — a company branch ID received in the company profile in the ID field,
FilialNamestring — a company branch name received in the company profile in the name field,
FilialAddressstring — a company branch address received in the company profile in the address field.

2. No results

It is recommended to show a link to the form after the search results, and make it particularly noticeable in case no results were found.

The display is carried out by calling the DG.feedback.showPopupNotFound(what, where) method, where
whatstring — a corresponding parameter of the search request,
wherestring — the where or point parameter of the search request. If the search was carried out for a point with a set radius, you need to pass these parameters by combining them into one string.

How to open the form

You can open the form on a new page, not as a modal window. For this purpose the following methods are used:
DG.feedback.showPopupDataError(FilialID, FilialName, FilialAddress)
DG.feedback.showPopupNotFound(what, where)

The parameters correspond to the methods described above.

Example

Below there are 4 examples for links to both types of forms in a modal or a new window.

<!DOCTYPE html>
<html>
    <head>
        <meta charset=“utf-8” />
        <title>2GIS API Feedback</title>
        <script src=http://feedback.api.2gis.ru/js/dg-api-feedback-loader.js" type=“text/javascript”></script>
    </head>
    <body>
       <p><a href =“javascript:void(0)” onClick=“DG.feedback.showPopupDataError
    (‘12345678’, ‘Company name’,‘Company address’)”>Found an error? Please let us know!</a></p>
       <p><a href =“javascript:void(0)” onClick=“DG.feedback.showPopupNotFound
    (‘cafe’,‘Novosibirsk, Lenin street, 14’)”>Company not found? Please let us know!</a></p>
       <p><a href =“javascript:void(0)” onClick=“DG.feedback.showWindowDataError
    (‘12345678’, ‘Company name’,‘Company address’)”>Open in the window Found an error? Please let us know!
    (Will be opened in a new window)</a></p>
       <p><a href =“javascript:void(0)” onClick=“DG.feedback.showWindowNotFound
    (‘cafe’,‘Novosibirsk, Lenin street, 14’)”>Company not found? Please let us know! (Will be opened in a new window)</a></p>
    </body>
</html>

Important

Make sure that the parameters are passed as strings in the “onClick” attribute of the “<a/>” tag!