Contents
On this page

Switch Cashier - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/staff/switch

Change who is signed in on the register without a password: the current login session ends and the browser gets the new cashier’s login cookie. Used by the register; still answers while the till is locked.

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). It needs a browser login session: a request signed with an Application Password is refused.

Request

POST https://your-site.example/wp-json/plugixa-pos/v1/staff/switch

Request body

Content type: application/json

Field Type Required Description
register_id integer Yes The register.
user_id integer Yes The cashier taking over.
pin string Yes 4 to 6 digits.
{
  "register_id": 1,
  "user_id": 102,
  "pin": "4826"
}

Responses

200 OK.

{
  "success": true,
  "data": {
    "user": {
      "id": 102,
      "name": "Léa (test cashier)"
    }
  }
}

Read a new REST nonce for the new user before the next call.

Errors

Status Code When
403 plugixa_pos_register_forbidden The register is missing or archived, or the user may not use it.
403 plugixa_pos_switch_forbidden The person cannot sell on this register, or must sign in with a password.
403 plugixa_pos_pin_wrong Wrong PIN.
429 plugixa_pos_pin_locked Five wrong PINs: PIN checks for that user, or from that address, are locked for 15 minutes.

Plus the errors every endpoint can return.

Quick Links

Share