Contents
On this page
Create Quote - Plugixa POS for WooCommerce
POST /plugixa-pos/v1/quotes
Price a cart as a sale would (taxes, discounts, promotions), without selling it, and keep it as a numbered quote valid for some days. Selling the quote later charges the quoted prices.
Needs a user with the plugixa_pos_sell capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it. The user must also be allowed to use the register (register access). Discounts and custom items also need plugixa_pos_discount.
Request
POST https://your-site.example/wp-json/plugixa-pos/v1/quotes
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
register_id |
integer |
Yes | The register. |
customer_id |
integer |
No | The customer. |
customer |
object |
No | What to print for the buyer: company, name, address, vat, email. |
lines |
object[] |
Yes | 1 to 200 lines: product_id, variation_id, qty, discount, options, custom, note, as in Create Sale. |
valid_days |
integer |
No | 1 to 365. Defaults to the quote_valid_days setting (30). |
note |
string |
No | Up to 500 characters. |
{
"register_id": 1,
"customer_id": 88,
"lines": [
{
"product_id": 3819,
"qty": 2
}
],
"note": "Corporate gift, 2 units"
}
Responses
201 Created.
{
"success": true,
"data": {
"id": 1,
"number": "QT-2026-00001",
"status": "open",
"register_id": 1,
"customer_id": 88,
"customer": "Camille Martin",
"lines": [
{
"product_id": 3819,
"variation_id": 0,
"qty": 2,
"name": "Minimal watch",
"unit": "149.00",
"discount": 0,
"options": [],
"option_rows": [],
"note": "",
"custom": null,
"ref": "quote:1:0"
}
],
"total": "298.00",
"tax": "49.67",
"currency": "EUR",
"valid_until": "2026-12-19",
"note": "Corporate gift, 2 units",
"order_id": 0,
"created_at": "2026-11-19T14:30:00+00:00"
}
}
| Field | Type | Meaning |
|---|---|---|
data.status |
string |
open, expired, converted or cancelled |
data.lines[].unit |
string |
Quoted unit price |
data.lines[].discount |
integer |
Quoted discount for the whole line, minor units |
data.lines[].ref |
string |
Send it back as ref when selling the line |
data.valid_until |
string |
Y-m-d |
data.order_id |
integer |
The sale once converted, else 0 |
Errors
| Status | Code | When |
|---|---|---|
403 |
plugixa_pos_forbidden |
The user may not use this register (this route answers with this code rather than plugixa_pos_register_forbidden). |
403 |
plugixa_pos_discount_forbidden |
A discount or custom item without plugixa_pos_discount. |
422 |
plugixa_pos_quote_empty |
No lines. |
500 |
plugixa_pos_quote_failed |
The quote could not be saved. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/quotes" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"register_id":1,"customer_id":88,"lines":[{"product_id":3819,"qty":2}],"note":"Corporate gift, 2 units"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/quotes');
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([
'register_id' => 1,
'customer_id' => 88,
'lines' => [
[
'product_id' => 3819,
'qty' => 2,
],
],
'note' => 'Corporate gift, 2 units',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/quotes', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ register_id: 1, customer_id: 88, lines: [{ product_id: 3819, qty: 2 }], note: 'Corporate gift, 2 units' }),
});
const { data } = await response.json();
Quick Links
Share