{"id":157,"date":"2018-06-29T22:52:25","date_gmt":"2018-06-29T22:52:25","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/settings\/api\/"},"modified":"2019-06-05T09:04:27","modified_gmt":"2019-06-05T09:04:27","slug":"api","status":"publish","type":"docs","link":"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/settings\/api\/","title":{"rendered":"API"},"content":{"rendered":"<p><span class=\"bookmark-index\"><br \/>\n<a href=\"#intros\">Introduction<\/a><br \/>\n<a href=\"#settings\">Settings<\/a><br \/>\n<a href=\"#keys\">Keys<\/a><br \/>\n<\/span> <\/p>\n<h3><a href=\"#intro\" name=\"intro\">Introduction<\/a><\/h3>\n<p>GeoDirectory V2 has a new API. This document gives an overview of the single on\/off setting.<\/p>\n<p>For detailed information, please see the <a href=\"https:\/\/wpgeodirectory.com\/docs-v2\/api\/\">API section of the docs<\/a>.<\/p>\n<p>The endpoint is: {yoursite.com}<strong>\/wp-json\/geodir\/v2\/<\/strong><\/p>\n<p>Most routes are declared there.<\/p>\n<p>Read on for how to use the settings provided at:<\/p>\n<blockquote><p><strong>GeoDirectory &#8211; Settings &#8211; API<\/strong><\/p><\/blockquote>\n<h3><a href=\"#settings\" name=\"settings\">Settings<\/a><\/h3>\n<h4>General Options<\/h4>\n<ul>\n<li><strong>API<\/strong><\/li>\n<\/ul>\n<p>Select whether or not to enable the REST API. To use Geodirectory the API must be enabled.<\/p>\n<h3><a href=\"#keys\" name=\"keys\">Keys<\/a><\/h3>\n<h4>Keys\/Apps<\/h4>\n<ul>\n<li><strong>Add Key \/ Create a New API Key<\/strong><\/li>\n<\/ul>\n<p>For each application that communicates with the GeoDirectory site a new and unique key can be created.<\/p>\n<h4>Key Details<\/h4>\n<p>For each key that is created you can configure the following settings.<\/p>\n<ul>\n<li><strong>Description<\/strong><\/li>\n<\/ul>\n<p>Use the description field to enter a friendly name for the key to identify it in the list of keys.<\/p>\n<ul>\n<li><strong>User<\/strong><\/li>\n<\/ul>\n<p>Select the WordPress user to associate with the key. The user will be the owner of the key and responsible for authentication using the key. \t<\/p>\n<ul>\n<li><strong>Permissions<\/strong><\/li>\n<\/ul>\n<p>Select the access type of the key: Read, Write, or Read Write.<\/p>\n<h3>Endpoints<\/h3>\n<p>To use API with GeoDirectory v2 you have to use v2 in all API routes.<br \/>\nFor example: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/ <\/p>\n<p>Here are some GeoDirectory API Routes:<br \/>\nBase route: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/<br \/>\nPost types: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/types\/<br \/>\nCPT listings: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/CPT<br \/>\nCPT categories: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/CPT\/categories<br \/>\nCPT tags: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/CPT\/tags<br \/>\nTaxonomies: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/taxonomies<br \/>\nReviews: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/reviews<br \/>\nFields: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/fields<br \/>\nCPT Fields: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/CPT\/fields<br \/>\nSettings: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/settings<br \/>\nSystem status: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/system_status<br \/>\nCountries: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/countries<br \/>\nMap Markers: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/markers<br \/>\nLocation types: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/locations<br \/>\nLocation countries: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/locations\/countries<br \/>\nLocation regions: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/locations\/regions<br \/>\nLocation cities: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/locations\/cities<br \/>\nLocation neighbourhoods: https:\/\/www.YOURSITE.com\/wp-json\/geodir\/v2\/locations\/neighbourhoods<\/p>\n<p>Make sure API settings enabled at GeoDirectory > Settings > API > Enable the REST API.<\/p>\n<h3><a href=\"#faq\" name=\"faq\">FAQ &#8211; Frequently Asked Questions<\/a><\/h3>\n<p>How do I get the content?<\/p>\n<p>WP-API<br \/>\nSince WP V4.5  the WP-API plugin is no longer required because WordPress has moved WP-API to core. Other plugins may require that plugin, but GDV2 does not.<\/p>\n","protected":false},"featured_media":0,"parent":96,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/157"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/comments?post=157"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/157\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/96"}],"prev":[{"title":"Import \/ Export","link":"https:\/\/wpgeodirectory.com\/docs-v2\/geodirectory\/settings\/import-export\/","href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/docs\/156"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs-v2\/wp-json\/wp\/v2\/doc_tag?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}