Contents
On this page

Download Invoice PDF - Plugixa POS for WooCommerce

GET /plugixa-pos/v1/invoices/{id}/pdf

The invoice or credit note as an A4 PDF.

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 be allowed to use the register of the sale (register access).

Request

GET https://your-site.example/wp-json/plugixa-pos/v1/invoices/2/pdf

Path parameters

Name Type Description
id integer The invoice’s id

Query parameters

Field Type Required Description
download boolean No Any non-empty value sends the file as an attachment instead of inline.

Responses

200 OK. The body is the PDF.

Not JSON: Content-Type: application/pdf, file name from the invoice number (FA-2026-00002.pdf).

Errors

Status Code When
404 plugixa_pos_not_found No such invoice, or its sale is not reachable for this user.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-pos/v1/invoices/2/pdf" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -o "FA-2026-00002.pdf"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/invoices/2/pdf');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
file_put_contents('FA-2026-00002.pdf', curl_exec($ch));
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/invoices/2/pdf', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const pdf = await response.blob();

Quick Links

Share