geodirectory/update-listing updates an existing listing. Only the keys you supply are changed.
Two of them do not behave the way “only supplied keys change” suggests.
At a glance
| Ability | geodirectory/update-listing |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Listings |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
Categories replace, and images are a trap
Sending post_category replaces the listing’s categories rather than adding to them. A listing in three categories, updated with one, is in one category afterwards.
Images are the sharper edge. GeoDirectory treats an empty images value as “delete every image” rather than “no change” — so a naive update that includes an empty images key wipes the gallery. clear_images exists to make that deliberate: without it, an empty value is refused.
They also do not round-trip. Images are written as strings and read as objects, so a geodirectory/get-listing response cannot be fed straight back into an update.
GeoDirectory fields are defined per site and per listing type. There is no fixed schema to know in advance, which is why geodirectory/list-listing-fields is the call before any listing write: it returns the accepted keys, and each row’s name — its htmlvar_name — is what you write under.
Omitting the listing type derives it from the listing itself, which is what you want on a multi-directory site — the alternative is defaulting to the site default and 404ing on anything else.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | Listing post ID. |
post_type | string | No | Derived from the listing itself when omitted. |
title | string | No | New title. |
content | string | No | New description. |
status | string | No | New post status. |
author | integer | No | New owner. Needs edit_others_posts. |
post_category | array | No | Replacement category term IDs. This replaces rather than adds. |
post_tags | string | No | Replacement comma-separated tag names. |
street | string | No | Street address. |
city | string | No | City. |
region | string | No | Region or state. |
country | string | No | Country. |
zip | string | No | Postal code. |
latitude | number | No | Latitude. |
longitude | number | No | Longitude. |
clear_images | boolean | No | Set true only to intentionally delete every image on the listing. |
fields | object | No | Custom fields to change, keyed by htmlvar_name. |
What comes back
| Name | Type | What it is |
|---|---|---|
listing | object | The listing after the write. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Update the phone number on listing 812.
It resolves to one call:
{
"ability": "geodirectory/update-listing",
"parameters": {
"id": 812,
"fields": { "phone": "0117 496 0001" }
}
}Worth knowing
- Categories replace. Include the ones you are keeping.
- An empty images value means delete all — hence
clear_images. - A get response cannot be fed back in; images read and write differently.
- Idempotent.
Related abilities
- GeoDirectory Get Listing — read the current values
- GeoDirectory Get Listing Package — why a write may not stick
- GeoDirectory Delete Listing — remove it instead
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category