Overview

Returns complete client details including configuration, modules, venues, and subscription information. This endpoint returns data only for the client associated with your API key.

Security: Your API key determines which client data is returned. You cannot access other clients' data.

Request

Endpoint

HTTP Request
GET https://api.pixelsuite.com.au/v1/client

Parameters

No parameters required. Your API key determines which client data is returned.

Example Request

cURL
curl -X GET "https://api.pixelsuite.com.au/v1/client" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Success Response (200 OK)

JSON
{
  "success": true,
  "data": {
    "client": {
      "ID": 1,
      "code": "CLIENT123",
      "displayName": "Example Client",
      "isActive": 1,
      "modules": {
        "roster": true,
        "inventory": true,
        "reporting": true
      },
      "setting": {
        "theme": "dark",
        "notifications": true
      },
      "dateStart": "2024-01-01",
      "dateEnd": "2025-12-31",
      "timezone": "Australia/Sydney",
      "fileAllowance": 10000,
      "isBeta": 0,
      "isDev": 0
    },
    "venues": [
      {
        "ID": 1,
        "clientID": 1,
        "companyName": "Example Pty Ltd",
        "tradingName": "Example Trading",
        "address1": "123 Main Street",
        "city": "Sydney",
        "state": "NSW",
        "postcode": "2000",
        "country": "Australia",
        "isActive": 1
      }
    ]
  }
}

Response Fields

Field Type Description
ID integer Unique client identifier
code string Client code (unique, max 16 chars)
displayName string Client display name
timezone string Client timezone (e.g., "Australia/Sydney")
modules object Enabled modules/features
setting object Client-specific settings
venues array Associated venues with full details

Error Responses

404 Not Found

No client associated with the API key.

{
  "success": false,
  "error": "Client not found",
  "message": "No client associated with this API key"
}

401 Unauthorized

Invalid or missing API key.

{
  "success": false,
  "error": "Unauthorized",
  "message": "Invalid or missing API key"
}

Use Cases

Timezone Configuration

Use the client's timezone to display dates and times correctly in your application.

Venue Information

Access venue addresses and contact details for location-based features.

Feature Detection

Check enabled modules to show/hide features based on client subscription.

Application Settings

Retrieve client-specific settings to customize your application behavior.

Code Examples

PHP
<?php
$apiKey = 'YOUR_API_KEY';
$url = 'https://api.pixelsuite.com.au/v1/client';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer {$apiKey}"
]);

$response = curl_exec($ch);
$data = json_decode($response, true);

if ($data['success']) {
    $client = $data['data']['client'];
    echo "Client: {$client['displayName']}\n";
    echo "Timezone: {$client['timezone']}\n";
    echo "Venues: " . count($data['data']['venues']) . "\n";
}

curl_close($ch);
JavaScript
const apiKey = 'YOUR_API_KEY';
const url = 'https://api.pixelsuite.com.au/v1/client';

fetch(url, {
  headers: {
    'Authorization': `Bearer ${apiKey}`
  }
})
.then(res => res.json())
.then(data => {
  if (data.success) {
    const { client, venues } = data.data;
    console.log(`Client: ${client.displayName}`);
    console.log(`Timezone: ${client.timezone}`);
    console.log(`Venues: ${venues.length}`);
  }
})
.catch(error => console.error('Error:', error));
Python
import requests

api_key = 'YOUR_API_KEY'
url = 'https://api.pixelsuite.com.au/v1/client'

headers = {
    'Authorization': f'Bearer {api_key}'
}

response = requests.get(url, headers=headers)
data = response.json()

if data['success']:
    client = data['data']['client']
    venues = data['data']['venues']
    print(f"Client: {client['displayName']}")
    print(f"Timezone: {client['timezone']}")
    print(f"Venues: {len(venues)}")