1. Home
  2. Docs
  3. API
  4. Fields

Fields


Introduction
Endpoints

Introduction

REST API End Points for managing and checking GD Fields.

EndPoints

/wp-json/geodir/v2/fields

Output

[
    {
        "id": "23",
        "type": "gd_place",
        "name": "post_category",
        "title": "Category",
        "admin_title": "Category",
        "description": "",
        "data_type": "VARCHAR",
        "field_type": "categories",
        "field_type_key": "categories",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": true,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail"
        ],
        "order": 4,
        "icon": "",
        "class": "",
        "default": true,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": {
            "cat_display_type": "select"
        },
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/23"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "24",
        "type": "gd_place",
        "name": "address",
        "title": "Address",
        "admin_title": "Address",
        "description": "",
        "data_type": "VARCHAR",
        "field_type": "address",
        "field_type_key": "address",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": true,
        "required_msg": "Address fields are required",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail",
            "mapbubble"
        ],
        "order": 7,
        "icon": "fas fa-map-marker-alt",
        "class": "",
        "default": true,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": {
            "show_city": 1,
            "city_lable": "City",
            "show_region": 1,
            "region_lable": "Region",
            "show_country": 1,
            "country_lable": "Country",
            "show_zip": 1,
            "zip_lable": "Zip/Post Code",
            "show_map": 1,
            "map_lable": "Set Address On Map",
            "show_mapview": 1,
            "mapview_lable": "Select Map View",
            "show_mapzoom": 1,
            "mapzoom_lable": "hidden",
            "show_latlng": 1
        },
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/24"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "25",
        "type": "gd_place",
        "name": "timing",
        "title": "Time",
        "admin_title": "Time",
        "description": "",
        "data_type": "VARCHAR",
        "field_type": "text",
        "field_type_key": "text",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail",
            "mapbubble"
        ],
        "order": 24,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/25"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "26",
        "type": "gd_place",
        "name": "phone",
        "title": "Phone",
        "admin_title": "Phone",
        "description": "",
        "data_type": "VARCHAR",
        "field_type": "phone",
        "field_type_key": "phone",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail",
            "mapbubble"
        ],
        "order": 25,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/26"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "27",
        "type": "gd_place",
        "name": "email",
        "title": "Email",
        "admin_title": "Email",
        "description": "",
        "data_type": "VARCHAR",
        "field_type": "email",
        "field_type_key": "email",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail"
        ],
        "order": 26,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/27"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "28",
        "type": "gd_place",
        "name": "website",
        "title": "Website",
        "admin_title": "Website",
        "description": "",
        "data_type": "TEXT",
        "field_type": "url",
        "field_type_key": "url",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail"
        ],
        "order": 27,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/28"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "29",
        "type": "gd_place",
        "name": "twitter",
        "title": "Twitter",
        "admin_title": "Twitter",
        "description": "",
        "data_type": "TEXT",
        "field_type": "url",
        "field_type_key": "url",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail"
        ],
        "order": 28,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/29"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "30",
        "type": "gd_place",
        "name": "facebook",
        "title": "Facebook",
        "admin_title": "Facebook",
        "description": "",
        "data_type": "TEXT",
        "field_type": "url",
        "field_type_key": "url",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "detail"
        ],
        "order": 29,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/30"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "31",
        "type": "gd_place",
        "name": "video",
        "title": "Video",
        "admin_title": "Video",
        "description": "",
        "data_type": "TEXT",
        "field_type": "textarea",
        "field_type_key": "textarea",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "owntab"
        ],
        "order": 30,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/31"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    },
    {
        "id": "32",
        "type": "gd_place",
        "name": "special_offers",
        "title": "Special Offers",
        "admin_title": "Special Offers",
        "description": "",
        "data_type": "TEXT",
        "field_type": "textarea",
        "field_type_key": "textarea",
        "decimal_point": "",
        "default_value": "",
        "placeholder": "",
        "required": false,
        "required_msg": "",
        "validation_pattern": "",
        "validation_msg": "",
        "option_values": "",
        "location": [
            "owntab"
        ],
        "order": 31,
        "icon": "",
        "class": "",
        "default": false,
        "private": false,
        "status": 1,
        "packages": "",
        "tab_parent": "0",
        "tab_level": 0,
        "sorting": false,
        "searching": false,
        "extra_fields": "",
        "_links": {
            "self": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields/32"
                }
            ],
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
                }
            ]
        }
    }
]

EndPoints

/wp-json/geodir/v2/fields/

Output

{
    "id": "23",
    "type": "gd_place",
    "name": "post_category",
    "title": "Category",
    "admin_title": "Category",
    "description": "",
    "data_type": "VARCHAR",
    "field_type": "categories",
    "field_type_key": "categories",
    "decimal_point": "",
    "default_value": "",
    "placeholder": "",
    "required": true,
    "required_msg": "",
    "validation_pattern": "",
    "validation_msg": "",
    "option_values": "",
    "location": [
        "detail"
    ],
    "order": 4,
    "icon": "",
    "class": "",
    "default": true,
    "private": false,
    "status": 1,
    "packages": "",
    "tab_parent": "0",
    "tab_level": 0,
    "sorting": false,
    "searching": false,
    "extra_fields": {
        "cat_display_type": "select"
    },
    "_links": {
        "self": [
            {
                "href": "http://local.newwp.test/wp-json/geodir/v2/fields/23"
            }
        ],
        "collection": [
            {
                "href": "http://local.newwp.test/wp-json/geodir/v2/fields"
            }
        ]
    }
}
Was this article helpful to you? Yes No