Contents
On this page

Plugixa Image Map REST API - Plugixa Image Map

The integration surface for Plugixa Image Map: maps you can list, create, edit, copy, trash and delete, one at a time or in bulk, their saved versions and checkpoints, export and import (from a file, from Image Map Pro, or from a CSV PRO), custom SVG icons PRO and statistics PRO. Enough to build maps from another system’s data, move them between sites, or feed hotspot clicks into a report.

The admin editor uses these same routes, under the namespace plugixa-image-map/v1, so anything the editor does with a map, a script can do too. Every capability the interface checks is checked again at the endpoint.

Base URL

https://your-site.example/wp-json/plugixa-image-map/v1

On a site with plain permalinks, pass the route as a parameter instead:

https://your-site.example/?rest_route=/plugixa-image-map/v1/maps

Authentication

Plugixa Image Map has no API keys of its own. It uses standard WordPress authentication:

Caller How it signs in
A script or another system A WordPress Application Password, sent as HTTP Basic auth
The admin editor, or your own code in wp-admin The logged-in cookie plus a wp_rest nonce in X-WP-Nonce, the normal WordPress way
The map’s visitor script Nothing: Record a Hit PRO is the one public route

Create an Application Password under Users -> Profile -> Application Passwords for the user the script should act as, then send it with the username:

curl -s "https://your-site.example/wp-json/plugixa-image-map/v1/maps" \
  -u "admin:$WP_APP_PASSWORD"

WordPress only accepts Application Passwords over HTTPS. A request that arrives signed out is refused with 401; a signed-in user without the capability gets 403.

Capabilities

Each route checks one of the plugin’s capabilities. Every user who can manage options (administrators) holds all of them, and activation also gives them to the Administrator role. Other roles get them as described in Roles and permissions.

Capability Allows
plugixa_image_map_view Listing and reading maps, revisions and statistics PRO
plugixa_image_map_create Creating and duplicating maps, and, with import, importing them
plugixa_image_map_edit Updating maps, publishing and unpublishing, checkpoints, restoring revisions, autosave, adding icons PRO
plugixa_image_map_delete Trashing, restoring and purging maps
plugixa_image_map_export Exporting a map
plugixa_image_map_import Importing from a file, from Image Map Pro or from a CSV PRO

Two routes use WordPress capabilities as well: Map Options needs only edit_posts, and Add Icon also needs upload_files. Code on your site can change any answer, for one user and one map, with the plugixa_image_map_user_can filter.

Responses

Every successful response is wrapped the same way:

{
  "success": true,
  "data": { "id": 12, "title": "Ground floor", "status": "published" },
  "meta": { "total": 37, "pages": 2 }
}

meta is only present when it has something in it. Creates answer 201, everything else 200, except Record a Hit, which answers 204 with no body. Booleans are real booleans, ids and counts are integers, and datetimes are UTC strings in the form 2026-11-12 09:30:00.

Writes that take a map document (create, update, duplicate, import) also return meta.warnings: what the cleaning changed or dropped, one { "path": "objects.0.id", "code": "id_replaced" } per change. A document is never refused for small faults; it is repaired and the repair is reported, so check the warnings after every write.

Lists and pagination

List Maps is the paged list. It puts the totals in meta, not in headers (X-WP-Total is not sent).

Parameter Type Default Description
page integer 1 Page to return, from 1
per_page integer 25 Rows per page, 1 to 200
search string Substring search over the title
orderby string id id, title, status, object_count, created_at or modified_at. Anything else falls back to id
order string desc asc or desc
view string active active, or trash for trashed maps only

Maps are soft-deleted: Trash Map moves one to the trash, where it stops appearing in single reads and in lists unless you ask for view=trash. Purge Map deletes it for good.

Saving safely: rev

Every map has a rev number that goes up by one with each save. Send the rev you read with your update. If the map was saved by someone else in the meantime, you get 409 Conflict instead of overwriting their work:

curl -s -X PUT "https://your-site.example/wp-json/plugixa-image-map/v1/maps/12" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"rev":4,"status":"published"}'

rev is optional. Without it, the save is still safe against a save arriving at the same moment, but not against one made since you read the map.

The map document

A map’s doc holds its picture, settings, hotspots and groups. Positions are percentages of the picture, so a map scales with it. Whatever you send is cleaned by the same rules as the editor: unknown keys are dropped, colours and addresses are checked and tooltip HTML is filtered. The answer contains the document as stored. Every key is described under Create Map.

Endpoints

Resource Endpoints
Maps List, Create, Get, Update, Trash, Restore, Purge, Duplicate, Bulk action, Options, Export
Revisions List, Create checkpoint, Get, Restore
Autosave Get, Save, Discard
Imports Map file, Image Map Pro sources, Image Map Pro map, Preview CSV PRO, Import CSV PRO
Icons PRO Add
Stats PRO Get, Record a hit

The admin screens also call a few routes of their own (/bootstrap, /dashboard, /settings and /maps/preview). They serve the interface rather than integrations and are not covered here.

Errors

Errors use the standard WordPress shape:

{
  "code": "plugixa_image_map_forbidden",
  "message": "You are not allowed to do that.",
  "data": { "status": 403 }
}

Some errors carry more in data: a conflict adds expected and current, a field that is too long adds field and max.

These can come back from any endpoint. Each endpoint page lists its own errors on top of them.

Status Code When
401 plugixa_image_map_forbidden The request arrived signed out: no Application Password, a wrong one, or plain HTTP.
403 plugixa_image_map_forbidden Signed in, but the user lacks the capability, or the plugixa_image_map_user_can filter refused.
403 rest_cookie_invalid_nonce A cookie request with a missing or stale nonce.
404 rest_no_route No such route or method, or a Pro route on the free build.
400 rest_invalid_param A parameter failed validation, for example per_page above 200 or order other than asc/desc.
500 plugixa_image_map_save_failed The database refused a write.

Only Record a Hit is rate limited.

Filtering what comes back

Hook Changes
plugixa_image_map_filter_output Every successful payload, before it is sent. The one place to hide or add fields
plugixa_image_map_user_can Whether a user may do an action, on one map
plugixa_image_map_map_saved Fires after any map is created or saved, the REST API included
plugixa_image_map_register_rest_routes Fires when routes are registered, which is where to add your own alongside them

See Hooks for the full set, and WP-CLI to do the same work from the command line.

Troubleshooting

Symptom Usual cause
401 from a script The Application Password is wrong or revoked, or the request is plain HTTP.
401 or 403 from the browser The nonce is missing or stale. Reload the admin.
403 for one user, not another That user’s role lacks the capability. See Roles and permissions.
404 on /csv, /icons or /stats The free build is installed. Those routes need Pro.
409 on update The map was saved since you read it. Read it again and send the new rev.
400 on a list status is not draft or published, or view is not active or trash.
A hotspot you sent is missing It was dropped by the cleaning: check meta.warnings for its path.

See also

Quick Links

Share