public function getId($iId = null)
    {
        $oInput = Factory::service('Input');
        $iId    = (int) $iId ?: (int) $oInput->get('id');

        if (empty($iId)) {
            throw new ApiException('Invalid Invoice ID', 404);
        }

        $oInvoiceModel = Factory::model('Invoice', 'nails/module-invoice');
        $oInvoice      = $oInvoiceModel->getById($iId, ['expand' => ['customer']]);

        if (empty($oInvoice)) {
            throw new ApiException('Invalid Invoice ID', 404);
        }

        return Factory::factory('ApiResponse', 'nails/module-api')
                      ->setData($this->formatInvoice($oInvoice));
    }