Contents
On this page

Assign Adyen Terminal - Plugixa POS for WooCommerce

POST /plugixa-pos/v1/adyen-terminal/registers/{id}

Choose the terminal a register uses.

Needs a user with the plugixa_pos_manage_settings 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.

Request

POST https://your-site.example/wp-json/plugixa-pos/v1/adyen-terminal/registers/1

Path parameters

Name Type Description
id integer The register’s id

Request body

Content type: application/json

Field Type Required Description
poiid string Yes The terminal id, model and serial number such as V400m-324688179.
{
  "poiid": "V400m-324688179"
}

Responses

200 OK. data is the setup, as in Get Adyen Terminal Setup.

Errors

Status Code When
422 plugixa_pos_adyen_poiid The id does not look like V400m-324688179.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/adyen-terminal/registers/1" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"poiid":"V400m-324688179"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/adyen-terminal/registers/1');
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([
        'poiid' => 'V400m-324688179',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/adyen-terminal/registers/1', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ poiid: 'V400m-324688179' }),
});
const { data } = await response.json();

Quick Links

Share