{"id":2823,"date":"2023-12-22T20:34:26","date_gmt":"2023-12-22T20:34:26","guid":{"rendered":"https:\/\/developers.maplink.global\/managing-your-establishments\/"},"modified":"2024-09-23T14:39:06","modified_gmt":"2024-09-23T14:39:06","slug":"managing-your-establishments","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/managing-your-establishments\/","title":{"rendered":"Managing your establishments"},"content":{"rendered":"\n<p>The POIs API allows you to <strong>feed and manage your own database of establishments<\/strong>, making searches customizable according to your needs. All the data created will be linked to the <em>client_ID<\/em> of the user who made the inclusion\/edit and can only be consulted by that user.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#cadastro\" data-type=\"internal\" data-id=\"#cadastro\">How to create and edit a new establishment<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#consulta\">How to consult a created establishment<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#consulta-base\">How to consult the establishment database<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#categoria\" data-type=\"internal\" data-id=\"#categoria\">How to consult the available categories and subcategories<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"#cidade\">How to check the states, cities and neighborhoods of registered establishments<\/a><\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cadastro\"><strong>How to create and edit a new establishment<\/strong><\/h2>\n\n\n\n<p>Adding and updating establishments is done via the following endpoint (<strong>POST<\/strong> method):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\">https:\/\/api.maplink.global\/place\/v1\/places<\/a> &#8211; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">POST<\/mark><\/strong><\/li>\n<\/ul>\n\n\n\n<p>The following parameters are required for inclusion or update:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>id<\/code>  &#8211; String with the establishment&#8217;s unique identifier. If the ID is already registered, the point of interest will be updated with the information sent;<\/li>\n\n\n\n<li><code>name<\/code>  &#8211; String to enter the name of the establishment;<\/li>\n\n\n\n<li><code>category<\/code>  &#8211; Category in which the establishment falls;<\/li>\n\n\n\n<li><code>subCategory<\/code>  &#8211; Subcategory in which the establishment falls;<\/li>\n\n\n\n<li><code>active<\/code>  &#8211; Boolean value to indicate whether the record is active or not (inactive records will not be<br>returned in the searches);<\/li>\n\n\n\n<li><code>address<\/code>  &#8211; Object with address details:\n<ul class=\"wp-block-list\">\n<li><code>street<\/code>  &#8211; String to enter the address;<\/li>\n\n\n\n<li><code>number<\/code>  &#8211; String for the establishment number;<\/li>\n\n\n\n<li><code>district<\/code>  &#8211; (Optional) String for the neighborhood;<\/li>\n\n\n\n<li><code>city<\/code>  &#8211; String for city;<\/li>\n\n\n\n<li><code>state<\/code>  &#8211; String for status;<\/li>\n\n\n\n<li><code>zipcode<\/code> &#8211; String for zip code;<\/li>\n\n\n\n<li><code>point<\/code>  &#8211; Array with the coordinates of the establishment:\n<ul class=\"wp-block-list\">\n<li><code>latitude<\/code>  &#8211; Latitude coordinate in decimal degrees;<\/li>\n\n\n\n<li><code>longitude<\/code>  &#8211; Longitude coordinate in decimal degrees;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>tags<\/code>  &#8211; (Optional) Array of strings with &#8220;tags&#8221;, or labels, to identify the type of establishment with customized categories;<\/li>\n\n\n\n<li><code>phones<\/code> &#8211; (Optional) Array of strings for contact phone numbers;<\/li>\n\n\n\n<li><code>additionalInfo<\/code>\u00a0\u2013 (Optional) Object with additional information about the point. The properties must be in string format in the pattern\u00a0<code>\"key\":\"value\"<\/code><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<cite><strong>Note<\/strong>: To consult the categories and subcategories available for consultation and registration, simply make a request to the following endpoints (<strong>GET<\/strong> method) <a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/category\">https:\/\/api.maplink.global\/place\/v1\/places\/category<\/a> and <a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/subcategory\">https:\/\/api.maplink.global\/place\/v1\/places\/subcategory<\/a><\/cite><\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>If you need to update an existing establishment, simply resend the request indicating the unique ID with all the required parameters and the updated data.<\/p>\n\n\n\n<p>The body of the request should follow the structure below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"id\": \"4321\",\n    \"name\": \"Restaurante Dummy\",\n    \"category\": \"ALIMENTOS_E_BEBIDAS\",\n    \"subCategory\": \"RESTAURANTES\",\n    \"address\": {\n        \"street\": \"Pra\u00e7a Tiradentes\",\n        \"number\": \"23\",\n        \"city\": \"Rio de Janeiro\",\n        \"state\": \"RJ\",\n        \"zipcode\": \"20060-070\",\n        \"point\": {\n            \"latitude\": -22.90741716416432,\n            \"longitude\": -43.182738139927416\n        }\n    },\n    \"phones\": [\n        \"(21) 91234-5678\"\n    ],\n    \"tags\": [\n        \"Self-Service Restaurant\"\n    ],\n    \"additionalInfo\": {\n        \"Open on Weekends\": \"Yes\",\n        \"Smoking Area\": \u200b\u200b\"Yes\"\n    },\n    \"active\": true\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"consulta\"><strong>How to consult a created establishment<\/strong><\/h2>\n\n\n\n<p>To consult all the establishments registered, simply make a <strong>GET <\/strong>request to the following endpoint, where the term <strong>{{placeId}<\/strong> } must be replaced by the ID of the establishment you want:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/%7B%7BplaceId%7D%7D\">https:\/\/api.maplink.global\/place\/v1\/places\/{{placeId}}<\/a> &#8211; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">GET<\/mark><\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"consulta-base\"><strong>How to consult the establishment database<\/strong><\/h2>\n\n\n\n<p>To consult all the registered establishments, simply make a <strong>GET <\/strong>request to the following endpoint:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\">https:\/\/api.maplink.global\/place\/v1\/places<\/a> &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>GET<\/strong><\/mark> <\/li>\n<\/ul>\n\n\n\n<p>You can filter the query results via parameters in the URL. The following filters are available:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>city<\/code>  &#8211; Filter results by city;<\/li>\n\n\n\n<li><code>district<\/code>  &#8211; Filter results by neighborhood or district;<\/li>\n\n\n\n<li><code>state<\/code>  &#8211; Filter results by state;<\/li>\n\n\n\n<li><code>tag<\/code>  &#8211; Filter results by tag;<\/li>\n\n\n\n<li><code>center<\/code>  &#8211; Reference coordinates for the search for results. Format: <code>center=-23.552088765,-46.6341653162<\/code>;<\/li>\n\n\n\n<li><code>radius<\/code>  &#8211; Specifies the search radius, in meters, from the center point set at <code>center<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>Example of use:<br><a href=\"https:\/\/api.maplink.global\/place\/v1\/places?city=Caieiras&amp;state=SP&amp;tags=abc123,restaurante&amp;center=-23.364792,-46.783109&amp;radius=149000&amp;district=Centro\">https:\/\/api.maplink.global\/place\/v1\/places?city=Caieiras&amp;state=SP&amp;tags=abc123,restaurante&amp;center=-23.364792,-46.783109&amp;radius=149000&amp;district=Centro<\/a><\/p>\n\n\n\n<p>You can also <strong>page through the results <\/strong>with the following parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>offset<\/code>  &#8211; Index of the first value;<\/li>\n\n\n\n<li><code>limit<\/code>  &#8211; Number of results per page, with a limit of 100.<\/li>\n<\/ul>\n\n\n\n<p>In the example below, we have 20 establishments registered and we want to paginate the results, with each page containing 10 establishments. To consult the first page we would have:<br><a href=\"https:\/\/api.maplink.global\/place\/v1\/places?offset=0&amp;limit=10\">https:\/\/api.maplink.global\/place\/v1\/places?offset=0&amp;limit=10<\/a><\/p>\n\n\n\n<p>For the second page we would have <a href=\"https:\/\/api.maplink.global\/place\/v1\/places?offset=9&amp;limit=10\">https:\/\/api.maplink.global\/place\/v1\/places?offset=9&amp;limit=10<\/a> and so on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"categoria\"><strong>How to consult the available categories and subcategories<\/strong><\/h2>\n\n\n\n<p>To see a list of all the categories available for registration, simply make a <strong>GET <\/strong>request to the following <em>endpoint<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/category\">https:\/\/api.maplink.global\/place\/v1\/places\/category<\/a> &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>GET<\/strong><\/mark> <\/li>\n<\/ul>\n\n\n\n<p>To consult the subcategories, use the following endpoint, also with the <strong>GET<\/strong> method:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/subcategory\">https:\/\/api.maplink.global\/place\/v1\/places\/subcategory<\/a> &#8211; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">GET<\/mark><\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"cidades\"><strong>How to check the states, cities and neighborhoods of registered establishments<\/strong><\/h2>\n\n\n\n<p>You can consult the states, cities or neighborhoods where there are establishments registered on the database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Consult states<\/strong><\/h3>\n\n\n\n<p>To consult the <strong>states <\/strong>where there are registered establishments, simply make a <strong>GET <\/strong>request to the following <em>endpoint<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/states\">https:\/\/api.maplink.global\/place\/v1\/places\/states<\/a> &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>GET<\/strong><\/mark> <\/li>\n<\/ul>\n\n\n\n<p>The return will come in <em>json<\/em> format, with an <em>array <\/em>containing the acronyms of the states where there are registered establishments, as shown in the example below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[\n    \"RJ\",\n    \"SP\"\n]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Consult cities<\/strong><\/h3>\n\n\n\n<p>To consult the <strong>cities <\/strong>where there are registered establishments, simply make a <strong>GET <\/strong>request to the <em>endpoint <\/em>below, where the term <code>{{state}}<\/code> must be replaced by the desired state<em>:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/state\/%7B%7Bstate%7D%7D\/cities\">https:\/\/api.maplink.global\/place\/v1\/places\/state\/{{state}}\/cities<\/a> &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>GET<\/strong><\/mark> <\/li>\n<\/ul>\n\n\n\n<p>The return will come in <em>json<\/em> format, with an <em>array <\/em>containing the cities in the requested state where there are registered establishments, as shown in the example below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[\n    \"S\u00e3o Paulo\",\n    \"Ribeir\u00e3o Preto\",\n    \"Campinas\" \n]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Consult neighborhoods<\/strong><\/h3>\n\n\n\n<p>Finally, to consult the <strong>neighborhoods <\/strong>where there are registered establishments, simply make a <strong>GET <\/strong>request to the <em>endpoint <\/em>below, where the term <code>{{state}}<\/code> must be replaced by the desired state<em> <\/em>and the term <code>{{city}}<\/code> by the city:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/api.maplink.global\/place\/v1\/places\/state\/%7B%7Bstate%7D%7D\/city\/%7B%7Bcity%7D%7D\/districts\">https:\/\/api.maplink.global\/place\/v1\/places\/state\/{{state}}\/city\/{{city}}\/districts<\/a> &#8211; <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>GET<\/strong><\/mark> <\/li>\n<\/ul>\n\n\n\n<p>The return will come in <em>json<\/em> format, with an <em>array <\/em>containing the neighborhoods of the requested city and state where there are registered establishments, as shown in the example below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[\n    \"S\u00e9 Bela Vista\",\n    \"Bom Retiro\",\n    \"Cambuci\",\n    \"Aricanduva\", \n]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The POIs API allows you to feed and manage your own database of establishments, making searches customizable according to your needs. All the data created will be linked to the client_ID of the user who made the inclusion\/edit and can only be consulted by that user. How to create and edit a new establishment Adding [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[170],"tags":[],"class_list":["post-2823","post","type-post","status-publish","format-standard","hentry","category-pois-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=2823"}],"version-history":[{"count":4,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2823\/revisions"}],"predecessor-version":[{"id":3031,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2823\/revisions\/3031"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}