Real-time Dashboards

Rest API to insert / delete orders on RTDashboards

An article how to use the Rest API to insert / delete orders to RTDashboards.

Steps before you can use the Rest API

Before you can use the Rest API you need to create an authorisation token and at least one webshop.

Create a security token

  • Create a free trial account at the regsiter page or login if you already have an account.
  • Go to your Dashboard -> 'Team settings'
  • Scroll to the bottom where you can create security / authorisation tokens.
  • Create a token, remember you can only see this token once so safe it somewhere safe
  • You can use the same token for multiple shops

Create a webshop

  • Add a webshop at: your shop page
  • Click on the '+ add a new shop` button.
  • Fill in the form (shop name, your shop url and the currency symbol)
  • Go back to the shops page.
  • Go back to the shops overview page on shops add note the shop ID Remeber / note the created shop ID

Use the Rest API

Next step is to implement the code to insert of delete orders to RTDashboards.
Woocommerce real-time sales dashboard on an Ipad

Create orders

Code examples to create orders

Example how to insert an order with Laravel

	
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'YOUR_CREATED_AUTH_TOKEN',
])
->post('http://rtdashboards.com/api/v1/create-order', [
    'price' => 12.25,
    'order_id' => 10,
    'shop_id' => 10,
]);

$jsonResponse = $response->json();


Example with Guzzle

	
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client(['headers' => [
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'YOUR_CREATED_AUTH_TOKEN',
]]);

$response = $client->post('http://rtdashboards.com/api/v1/create-order', [
    \GuzzleHttp\RequestOptions::JSON => ['price' => 12.25, 'order_id' => 10, 'shop_id' => 10]
]);

$body = $response->getBody();
$jsonResponse = json_decode($body, true);



Delete orders

Examples how to delete orders with the Rest API

With Laravel

	
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'YOUR_CREATED_AUTH_TOKEN',
])
->post('http://rtdashboards.com/api/v1/delete-order', [    
    'order_id' => 10,
    'shop_id' => 10,
]);

$jsonResponse = $response->json();


Delete orders with Guzzle

	
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client(['headers' => [
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'YOUR_CREATED_AUTH_TOKEN',
]]);

$response = $client->post('http://rtdashboards.com/api/v1/delete-order', [
    \GuzzleHttp\RequestOptions::JSON => ['order_id' => 10, 'shop_id' => 10]
]);

$body = $response->getBody();
$jsonResponse = json_decode($body, true);
Home |© 2025 RTDashboards