2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| API Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
|
2020-04-04 12:32:42 +02:00
|
|
|
*/
|
2020-03-25 09:36:47 +01:00
|
|
|
Route::get('/api/v1/ping', 'PingController@index')->name('ping');
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-02-13 12:27:42 +01:00
|
|
|
Route::group(['middleware' => ['api_secret_check']], function () {
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('api/v1/signup', 'AccountController@store')->name('signup.submit');
|
|
|
|
Route::post('api/v1/oauth_login', 'Auth\LoginController@oauthApiLogin');
|
2020-03-17 09:40:10 +01:00
|
|
|
});
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-01-23 21:35:00 +01:00
|
|
|
Route::group(['api_secret_check', 'email_db'], function () {
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('api/v1/login', 'Auth\LoginController@apiLogin')->name('login.submit');
|
|
|
|
Route::post('api/v1/reset_password', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.reset');
|
2020-03-17 09:40:10 +01:00
|
|
|
});
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-02-02 08:54:52 +01:00
|
|
|
Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('activities', 'ActivityController');// name = (clients. index / create / show / update / destroy / edit
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('clients', 'ClientController');// name = (clients. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('clients/bulk', 'ClientController@bulk')->name('clients.bulk');
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('invoices', 'InvoiceController');// name = (invoices. index / create / show / update / destroy / edit
|
2019-03-27 10:38:28 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('invoices/{invoice}/{action}', 'InvoiceController@action')->name('invoices.action');
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('invoice/{invitation_key}/download', 'InvoiceController@downloadPdf')->name('invoices.downloadPdf');
|
2020-01-30 02:27:22 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('invoices/bulk', 'InvoiceController@bulk')->name('invoices.bulk');
|
2020-01-30 02:27:22 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('credits', 'CreditController');// name = (credits. index / create / show / update / destroy / edit
|
2020-01-30 02:27:22 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('credits/{credit}/{action}', 'CreditController@action')->name('credits.action');
|
2019-04-03 02:09:22 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('credits/bulk', 'CreditController@bulk')->name('credits.bulk');
|
2019-04-03 02:09:22 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('products', 'ProductController');// name = (products. index / create / show / update / destroy / edit
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('products/bulk', 'ProductController@bulk')->name('products.bulk');
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('quotes', 'QuoteController');// name = (quotes. index / create / show / update / destroy / edit
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('quotes/{quote}/{action}', 'QuoteController@action')->name('quotes.action');
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('quotes/bulk', 'QuoteController@bulk')->name('quotes.bulk');
|
2020-02-19 21:44:12 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('recurring_invoices', 'RecurringInvoiceController');// name = (recurring_invoices. index / create / show / update / destroy / edit
|
2019-05-05 02:49:01 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('recurring_invoices/bulk', 'RecurringInvoiceController@bulk')->name('recurring_invoices.bulk');
|
2019-05-05 02:49:01 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('recurring_quotes', 'RecurringQuoteController');// name = (recurring_invoices. index / create / show / update / destroy / edit
|
2020-01-20 02:31:58 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('recurring_quotes/bulk', 'RecurringQuoteController@bulk')->name('recurring_quotes.bulk');
|
2020-01-20 02:31:58 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('expenses', 'ExpenseController');// name = (expenses. index / create / show / update / destroy / edit
|
2020-01-20 02:31:58 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('expenses/bulk', 'ExpenseController@bulk')->name('expenses.bulk');
|
2020-01-20 02:31:58 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('vendors', 'VendorController');// name = (vendors. index / create / show / update / destroy / edit
|
2019-05-03 10:28:48 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('vendors/bulk', 'VendorController@bulk')->name('vendors.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('client_statement', 'ClientStatementController@statement');// name = (client_statement. index / create / show / update / destroy / edit
|
2020-01-20 11:10:33 +01:00
|
|
|
|
2020-05-23 05:28:24 +02:00
|
|
|
Route::resource('payment_terms', 'PaymentTermController');// name = (payments. index / create / show / update / destroy / edit
|
|
|
|
|
2020-05-26 10:20:50 +02:00
|
|
|
Route::post('payment_terms/bulk', 'PaymentTermController@bulk')->name('payment_terms.bulk');
|
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('payments', 'PaymentController');// name = (payments. index / create / show / update / destroy / edit
|
2020-01-23 21:35:00 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('payments/refund', 'PaymentController@refund')->name('payments.refund');
|
2019-05-03 10:28:48 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('payments/bulk', 'PaymentController@bulk')->name('payments.bulk');
|
2019-11-28 11:35:13 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('migrate', 'MigrationController@index')->name('migrate.start');
|
2019-06-11 05:20:23 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('designs', 'DesignController');// name = (payments. index / create / show / update / destroy / edit
|
2019-06-12 06:22:05 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('users', 'UserController@index');
|
|
|
|
Route::put('users/{user}', 'UserController@update')->middleware('password_protected');
|
|
|
|
Route::post('users', 'UserController@store')->middleware('password_protected');
|
|
|
|
Route::post('users/{user}/attach_to_company', 'UserController@attach')->middleware('password_protected');
|
|
|
|
Route::delete('users/{user}/detach_from_company', 'UserController@detach')->middleware('password_protected');
|
|
|
|
Route::post('users/bulk', 'UserController@bulk')->name('users.bulk')->middleware('password_protected');
|
2019-11-20 06:41:49 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('migration/purge/{company}', 'MigrationController@purgeCompany')->middleware('password_protected');
|
|
|
|
Route::post('migration/purge_save_settings/{company}', 'MigrationController@purgeCompanySaveSettings')->middleware('password_protected');
|
|
|
|
Route::post('migration/start/{company}', 'MigrationController@startMigration');
|
2019-06-17 02:15:42 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('companies', 'CompanyController');// name = (companies. index / create / show / update / destroy / edit
|
2020-04-09 12:48:04 +02:00
|
|
|
|
|
|
|
Route::resource('tokens', 'TokenController');// name = (tokens. index / create / show / update / destroy / edit
|
2019-10-03 05:21:24 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('company_gateways', 'CompanyGatewayController');
|
|
|
|
|
2020-06-04 00:18:27 +02:00
|
|
|
Route::post('company_gateways/bulk', 'CompanyGatewayController@bulk')->name('company_gateways.bulk');
|
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::put('company_users/{user}', 'CompanyUserController@update');
|
2019-10-05 00:58:51 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('group_settings', 'GroupSettingController');
|
2019-10-29 03:55:26 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('tax_rates', 'TaxRateController');// name = (tasks. index / create / show / update / destroy / edit
|
2019-11-04 21:50:10 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('refresh', 'Auth\LoginController@refresh');
|
2019-11-04 21:50:10 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('templates', 'TemplateController@show')->name('templates.show');
|
|
|
|
|
2020-06-01 01:59:26 +02:00
|
|
|
Route::post('preview', 'PreviewController@show')->name('preview.show');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('self-update', 'SelfUpdateController@update')->middleware('password_protected');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('self-update/check_version', 'SelfUpdateController@checkVersion');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-23 18:15:56 +01:00
|
|
|
Route::post('claim_license', 'LicenseController@index')->name('license.index');
|
|
|
|
|
2020-03-28 12:34:04 +01:00
|
|
|
Route::post('emails', 'EmailController@send')->name('email.send');
|
|
|
|
|
2020-04-09 12:48:04 +02:00
|
|
|
/*Subscription and Webhook routes */
|
|
|
|
Route::post('hooks', 'SubscriptionController@subscribe')->name('hooks.subscribe');
|
|
|
|
Route::delete('hooks/{subscription_id}', 'SubscriptionController@unsubscribe')->name('hooks.unsubscribe');
|
|
|
|
Route::resource('subscriptions', 'SubscriptionController');
|
|
|
|
Route::post('subscriptions/bulk', 'SubscriptionController@bulk')->name('subscriptions.bulk');
|
|
|
|
|
2020-04-11 13:19:05 +02:00
|
|
|
/*Company Ledger */
|
|
|
|
Route::get('company_ledger', 'CompanyLedgerController@index')->name('company_ledger.index');
|
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
/*
|
|
|
|
Route::resource('tasks', 'TaskController'); // name = (tasks. index / create / show / update / destroy / edit
|
2020-03-02 11:22:37 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('tasks/bulk', 'TaskController@bulk')->name('tasks.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::resource('credits', 'CreditController'); // name = (credits. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::post('credits/bulk', 'CreditController@bulk')->name('credits.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
|
|
|
|
2020-02-10 10:53:02 +01:00
|
|
|
|
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
Route::get('settings', 'SettingsController@index')->name('user.settings');
|
|
|
|
*/
|
|
|
|
Route::post('support/messages/send', 'Support\Messages\SendingController');
|
2020-03-17 09:40:10 +01:00
|
|
|
});
|
|
|
|
|
2019-03-30 10:30:41 +01:00
|
|
|
|
2020-01-23 21:35:00 +01:00
|
|
|
Route::fallback('BaseController@notFound');
|