<?php
/**
 * Rig N Dig - Pioneer Suite API v1 Index
 */
header('Content-Type: application/json');
require_once '../../config/config.php';
require_once 'api_helper.php';

apiResponse(true, 'Rig N Dig Pioneer API v1 is active', [
    'version' => '1.0.0',
    'endpoints' => [
        'auth' => [
            'login' => '/api/v1/login.php [POST]',
            'register' => '/api/v1/auth/register.php [POST]',
            'profile' => '/api/v1/auth/profile.php [GET/POST]'
        ],
        'catalog' => [
            'categories' => '/api/v1/products/categories.php [GET]',
            'products' => '/api/v1/products/list.php [GET?q=search&cat=ID]'
        ],
        'b2b' => [
            'quote_submit' => '/api/v1/quotes/submit.php [POST]',
            'history' => '/api/v1/quotes/list.php [GET?type=rfq|estimate|po]',
            'track_order' => '/api/v1/orders/track.php [GET]'
        ],
        'verification' => [
            'certificate' => '/api/v1/certificates/verify.php [GET?sn=SERIAL]'
        ],
        'system' => [
            'config' => '/api/v1/config.php [GET]',
            'faq' => '/api/v1/faqs.php [GET]'
        ]
    ]
]);
