Location Field
There is only type of location field: single_location
.
single_location
field-values can only hold a single location, including the address properties and a map preview.
In addition to the common field properties, a location field has the following settings:
has_map
(optional): boolean flag, whether the google maps embed should be shown in the location field values of this field. (default: false)
App creation
A location field can be created as part of an App creation. Here is an example request body for creating an excerpt for a meetings app within a workspace with ID 1.
The app contains a single_location
field "Location". Other useful fields for a meetings app, like "Date", "Participants" or "Notes" are omitted for brevity.
- cURL
- JSON
curl -X POST https://api.tapeapp.com/v1/app/ \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"workspace_id": 1,
"name": "Meetings",
"item_name": "Meeting",
"fields": [
{
"field_type": "single_location",
"config": {
"label": "Location",
"description": "The location of the meeting.",
"required": false,
"settings": {
"has_map": true
}
}
}
]
}'
{
"workspace_id": 1,
"name": "Meetings",
"item_name": "Meeting",
"fields": [
{
"field_type": "single_location",
"config": {
"label": "Location",
"description": "The location of the meeting.",
"required": false,
"settings": {
"has_map": true
}
}
}
]
}
{
"app_id": 1,
"workspace_id": 1,
"slug": "meetings",
"name": "Meetings",
"record_name": "Meeting",
"item_name": "Meeting",
"position": 0,
"config": {
"item_name": "Meeting",
"name": "Meetings"
},
"fields": [
{
"field_id": 1,
"slug": "location",
"label": "Location",
"type": "location",
"field_type": "single_location",
"config": {
"label": "Location",
"slug": "location",
"description": "The location of the meeting.",
"required": false,
"always_hidden": false,
"hidden_if_empty": false,
"settings": {
"has_map": true
}
}
}
]
}
App update
A location field can be created or updated as part of an App update. Here is an example request body for updating the previously created meetings app with ID 1.
The update sets the has_map
flag to false.
- cURL
- JSON
curl -X PUT https://api.tapeapp.com/v1/app/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" --data '{
"app_id": 1,
"name": "Meetings",
"item_name": "Meeting",
"fields": [
{
"field_id": 1,
"config": {
"label": "Location",
"description": "The location of the meeting.",
"required": false,
"settings": {
"has_map": false
}
}
}
]
}'
{
"app_id": 1,
"name": "Meetings",
"item_name": "Meeting",
"fields": [
{
"field_id": 1,
"config": {
"label": "Location",
"description": "The location of the meeting.",
"required": false,
"settings": {
"has_map": false
}
}
}
]
}
{
"app_id": 1,
"workspace_id": 1,
"slug": "meetings",
"name": "Meetings",
"record_name": "Meeting",
"item_name": "Meeting",
"position": 0,
"config": {
"item_name": "Meeting",
"name": "Meetings"
},
"fields": [
{
"field_id": 1,
"external_id": "location",
"slug": "location",
"label": "Location",
"type": "location",
"field_type": "single_location",
"config": {
"label": "Location",
"slug": "location",
"description": "The location of the meeting.",
"required": false,
"always_hidden": false,
"hidden_if_empty": false,
"settings": {
"has_map": false
}
}
}
]
}```