Contents
On this page
Bulk Update Addresses - Plugixa Permalink Manager
POST /plugixa-permalink-manager/v1/uris/bulk
Save up to 200 changes in one request. Each row is handled on its own and reports its own result.
Needs the plugixa_permalink_manager_edit capability. Each row also needs the WordPress permission to edit that post or term; a row you may not edit is reported as forbidden and the others still save.
Request
POST https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/bulk
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
changes |
array |
Yes | 1 to 200 rows. Each has kind (post or term), id, and the same uri, mode, reset and expected_modified_at fields as Update Address. |
Rows are saved in the order sent. One refused row does not stop or undo the others.
{
"changes": [
{
"kind": "post",
"id": 36,
"uri": "shop/tents/skyline-2",
"mode": -1
},
{
"kind": "term",
"id": 14,
"reset": true
}
]
}
Responses
200 OK, even when some rows were refused.
{
"success": true,
"data": [
{
"key": "post:36",
"status": "saved",
"row": {
"kind": "post",
"id": 36,
"key": "post:36",
"type": "product",
"title": "Skyline 2 Tent",
"slug": "skyline-2",
"status": "publish",
"uri": "shop/tents/skyline-2",
"native_uri": "product/skyline-2",
"is_custom": true,
"mode": -1,
"source": "manual",
"lock": null,
"permalink": "https://your-site.example/shop/tents/skyline-2/",
"edit_url": "https://your-site.example/wp-admin/post.php?post=36&action=edit",
"redirects_count": 1,
"modified_at": "2026-11-12 09:30:00"
}
},
{
"key": "term:14",
"status": "conflict",
"error": {
"code": "plugixa_permalink_manager_uri_conflict",
"message": "No free address could be found.",
"data": []
}
}
],
"meta": {
"counts": {
"saved": 1,
"conflict": 1
}
}
}
| Field | Type | Meaning |
|---|---|---|
data[].key |
string |
kind:id of the row |
data[].status |
string |
saved, unchanged, stale, conflict, not_found, forbidden or invalid |
data[].row |
object |
The item after the change, in the shape of Get Address. Present for saved, unchanged and stale |
data[].error |
object |
code, message and data (for a conflict, owner and suggestion), for a refused row |
meta.counts |
object |
How many rows ended in each status |
Errors
| Status | Code | When |
|---|---|---|
400 |
plugixa_permalink_manager_invalid |
changes is missing, empty or not a list. |
413 |
plugixa_permalink_manager_too_many |
More than 200 rows. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/bulk" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"changes":[{"kind":"post","id":36,"uri":"shop/tents/skyline-2","mode":-1},{"kind":"term","id":14,"reset":true}]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/bulk');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'changes' => [
[
'kind' => 'post',
'id' => 36,
'uri' => 'shop/tents/skyline-2',
'mode' => -1,
],
[
'kind' => 'term',
'id' => 14,
'reset' => true,
],
],
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-permalink-manager/v1/uris/bulk', {
method: 'POST',
headers: {
'Authorization': auth,
'Content-Type': 'application/json',
},
body: JSON.stringify({
changes: [
{ kind: 'post', id: 36, uri: 'shop/tents/skyline-2', mode: -1 },
{ kind: 'term', id: 14, reset: true },
],
}),
});
const { data, meta } = await response.json();
Quick Links
Share