Contents
On this page
Run Import - Plugixa Extra Product Options
POST /plugixa-epo/v1/importers/{source}
Read the other plugin’s data and create one draft group per set of options. The other plugin and its data are not changed. Running it again skips what was already imported, as long as that group still exists.
Needs a user with the plugixa_epo_manage capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators and shop managers hold it; see Permissions. Pro only: on the free plugin this route answers 404 rest_no_route.
Request
POST https://your-store.example/wp-json/plugixa-epo/v1/importers/yith-product-add-ons
Path parameters
| Name | Type | Description |
|---|---|---|
source |
string |
The source id, from List Import Sources |
Request body
No body.
Responses
201 Created.
{
"success": true,
"data": {
"created": [
{
"id": 13,
"title": "Gift wrapping"
},
{
"id": 14,
"title": "Engraving"
}
],
"skipped": 0,
"notes": ["Card message: a show/hide rule could not be carried over; set it again."]
}
}
| Field | Type | Meaning |
|---|---|---|
created |
array |
The new draft groups, each { id, title } |
skipped |
integer |
Sets of options already imported |
notes |
string[] |
What could not be carried over exactly: check it before publishing |
The created list is shortened here.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_epo_forbidden |
The caller lacks the capability: You are not allowed to do that. |
404 |
plugixa_epo_not_found |
No source has this id: Not found. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-store.example/wp-json/plugixa-epo/v1/importers/yith-product-add-ons" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-epo/v1/importers/yith-product-add-ons');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-store.example/wp-json/plugixa-epo/v1/importers/yith-product-add-ons', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share