Contents
On this page

Cancel Supplier Return - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/supplier-returns/{id}/cancel

Cancel a return.

Needs a user with the plugixa_pos_purchase capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Unlike the other capabilities, Pro gives this one to administrators and to the WooCommerce Shop manager role.

Request

POST https://your-site.example/wp-json/plugixa-pos/v1/supplier-returns/1/cancel

Path parameters

Name Type Description
id integer The supplier return’s id

Responses

200 OK. data is the return.

{
  "success": true,
  "data": {
    "id": 1,
    "number": "RT-000001",
    "supplier_id": 1,
    "supplier_name": "Torréfaction du Marais",
    "outlet_id": 1,
    "outlet_name": "Maison Plugixa Marais",
    "status": "cancelled",
    "reason": "Damaged in transit",
    "created_at": "2026-10-13 08:00:00",
    "sent_at": null,
    "total": "7.60",
    "items": [
      {
        "product_id": 3720,
        "name": "House espresso beans 250 g",
        "sku": "COF-HOUSE",
        "qty": 2,
        "unit_cost": "3.8000",
        "total": "7.60"
      }
    ]
  }
}

Errors

Status Code When
404 plugixa_pos_not_found No supplier return with that id.
409 plugixa_pos_return_status The return cannot do that in its current state.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/supplier-returns/1/cancel" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/supplier-returns/1/cancel');
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-site.example/wp-json/plugixa-pos/v1/supplier-returns/1/cancel', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share