Contents
Import Fixed Prices - Plugixa Multi Currency for WooCommerce
POST /plugixa-multi-currency/v1/pro/prices/import
Set fixed prices from a CSV file, in the format of Export Fixed Prices. Each line sets the prices of one product in one currency.
Needs a user with the plugixa_multi_currency_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; see Capabilities. The user also needs WooCommerce’s edit_products, because these routes change product prices.
Note. Pro only: on the free plugin this route answers
404rest_no_route.
Request
POST https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/prices/import
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
csv |
string |
Yes | The file’s text, up to 5 MB. |
The header row must have currency and regular. Products are found by product_id, or by sku when the id is empty. sale_from and sale_to are read only when the header has them. An empty regular removes the fixed price of that line.
{
"csv": "product_id,sku,currency,regular,sale,sale_from,sale_to\n15,,EUR,17.90,15.90,2026-11-27,2026-11-30\n,woo-album,GBP,12.50,,,"
}
Responses
200 OK, even when lines were skipped.
{
"success": true,
"data": {
"updated": 2,
"skipped": []
}
}
| Field | Type | Meaning |
|---|---|---|
updated |
integer |
Products changed |
skipped |
object[] |
Each skipped line: line (its number in the file, the header is 1) and reason |
Reasons: The header has no “regular” column., No matching product or variation (a variable product is priced on its variations)., “CHF” is not one of your currencies (the store currency has no fixed price)., A price is not a valid number., The sale price must be lower than the regular price., “sale_to” must be a date like 2026-12-31, or empty.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
rest_forbidden |
The caller lacks the capability: Sorry, you are not allowed to do that. |
413 |
plugixa_multi_currency_csv_too_big |
The file is larger than 5 MB. Split it and import the parts. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/prices/import" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"csv":"product_id,sku,currency,regular,sale,sale_from,sale_to\n15,,EUR,17.90,15.90,2026-11-27,2026-11-30\n,woo-album,GBP,12.50,,,"}'
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/prices/import');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'csv' => 'product_id,sku,currency,regular,sale,sale_from,sale_to
15,,EUR,17.90,15.90,2026-11-27,2026-11-30
,woo-album,GBP,12.50,,,',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/prices/import', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ csv: 'product_id,sku,currency,regular,sale,sale_from,sale_to
15,,EUR,17.90,15.90,2026-11-27,2026-11-30
,woo-album,GBP,12.50,,,' }),
});
const { data } = await response.json();
Quick Links
Share