mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #8280 from turbo124/v5-develop
Fixes for translations
This commit is contained in:
commit
678d66c6e8
@ -32,6 +32,11 @@ class OpenApiYaml extends Command
|
||||
*/
|
||||
protected $description = 'Build OpenApi YAML';
|
||||
|
||||
private array $directories = [
|
||||
'/components/schemas',
|
||||
'/paths/'
|
||||
];
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
@ -61,14 +66,50 @@ class OpenApiYaml extends Command
|
||||
|
||||
$this->info($file);
|
||||
|
||||
}
|
||||
|
||||
Storage::disk('base')->delete('/openapi/api-docs.yaml');
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/info.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/paths/paths.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/components.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/paths.yaml'));
|
||||
|
||||
//iterate paths
|
||||
$directory = new DirectoryIterator($path . '/paths/');
|
||||
|
||||
foreach ($directory as $file) {
|
||||
|
||||
if ($file->isFile() && ! $file->isDot())
|
||||
{
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents("{$path}/paths/{$file->getFilename()}"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/schemas.yaml'));
|
||||
|
||||
//iterate schemas
|
||||
|
||||
$directory = new DirectoryIterator($path . '/components/schemas/');
|
||||
|
||||
foreach ($directory as $file) {
|
||||
|
||||
if ($file->isFile() && ! $file->isDot())
|
||||
{
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents("{$path}/components/schemas/{$file->getFilename()}"));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/schemas/account.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/misc/misc.yaml'));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -127,6 +127,10 @@ class IncomeTransformer implements BankRevenueInterface
|
||||
|
||||
foreach($transaction->transaction as $transaction)
|
||||
{
|
||||
//do not store duplicate / pending transactions
|
||||
if(property_exists($transaction,'status') && $transaction->status == 'PENDING')
|
||||
continue;
|
||||
|
||||
$data[] = $this->transformTransaction($transaction);
|
||||
}
|
||||
|
||||
|
@ -52,12 +52,6 @@ class TokenAuth
|
||||
return response()->json($error, 403);
|
||||
}
|
||||
|
||||
$truth = app()->make(TruthSource::class);
|
||||
|
||||
$truth->setCompanyUser($company_token->cu);
|
||||
$truth->setUser($company_token->user);
|
||||
$truth->setCompany($company_token->company);
|
||||
$truth->setCompanyToken($company_token);
|
||||
|
||||
/*
|
||||
|
|
||||
@ -67,7 +61,19 @@ class TokenAuth
|
||||
|
|
||||
*/
|
||||
|
||||
$truth = app()->make(TruthSource::class);
|
||||
|
||||
$truth->setCompanyUser($company_token->cu);
|
||||
$truth->setUser($company_token->user);
|
||||
$truth->setCompany($company_token->company);
|
||||
$truth->setCompanyToken($company_token);
|
||||
|
||||
/*
|
||||
| This method binds the db to the jobs created using this
|
||||
| session
|
||||
*/
|
||||
app('queue')->createPayloadUsing(function () use ($company_token) {
|
||||
nlog("setting DB ". $company_token->company->db);
|
||||
return ['db' => $company_token->company->db];
|
||||
});
|
||||
|
||||
|
@ -37,6 +37,7 @@ class MultiDBProvider extends ServiceProvider
|
||||
JobProcessing::class,
|
||||
function ($event) {
|
||||
if (isset($event->job->payload()['db'])) {
|
||||
nlog("Settings DB: " . $event->job->payload()['db']);
|
||||
MultiDB::setDb($event->job->payload()['db']);
|
||||
}
|
||||
}
|
||||
|
65
app/Services/Email/MailEntity.php
Normal file
65
app/Services/Email/MailEntity.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Email;
|
||||
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Company;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class MailEntity implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
protected Company $company;
|
||||
|
||||
public function __construct(protected $invitation, private ?string $db, private ?string $reminder_template = null, private ?string $template_data = null, private bool $override = false)
|
||||
{
|
||||
|
||||
$this->invitation = $invitation;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->reminder_template = $reminder_template;
|
||||
|
||||
$this->template_data = $template_data;
|
||||
|
||||
$this->override = $override;
|
||||
|
||||
// $this->entity_string = $this->resolveEntityString();
|
||||
|
||||
// $this->entity = $invitation->{$this->entity_string};
|
||||
|
||||
// $this->settings = $invitation->contact->client->getMergedSettings();
|
||||
|
||||
// $this->reminder_template = $reminder_template ?: $this->entity->calculateTemplate($this->entity_string);
|
||||
|
||||
// $this->html_engine = new HtmlEngine($invitation);
|
||||
|
||||
// $this->template_data = $template_data;
|
||||
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
MultiDB::setDb($this->db);
|
||||
|
||||
//construct mailable
|
||||
|
||||
//construct mailer
|
||||
|
||||
}
|
||||
|
||||
}
|
80
app/Services/Email/MailObject.php
Normal file
80
app/Services/Email/MailObject.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Email;
|
||||
|
||||
use Illuminate\Mail\Mailables\Address;
|
||||
|
||||
/**
|
||||
* MailObject.
|
||||
*/
|
||||
class MailObject
|
||||
{
|
||||
|
||||
public ?string $db = null;
|
||||
|
||||
public array $to = [];
|
||||
|
||||
public ?Address $from = null;
|
||||
|
||||
public array $reply_to = [];
|
||||
|
||||
public array $cc = [];
|
||||
|
||||
public array $bcc = [];
|
||||
|
||||
public ?string $subject = null;
|
||||
|
||||
public ?string $body = null;
|
||||
|
||||
public array $attachments = [];
|
||||
|
||||
public string $company_key;
|
||||
|
||||
public ?object $settings = null;
|
||||
|
||||
public bool $whitelabel = false;
|
||||
|
||||
public ?string $logo = null;
|
||||
|
||||
public ?string $signature = null;
|
||||
|
||||
public ?string $greeting = null;
|
||||
|
||||
public ?int $client_id = null;
|
||||
|
||||
public ?int $vendor_id = null;
|
||||
|
||||
public ?int $user_id = null;
|
||||
|
||||
public ?int $client_contact_id = null;
|
||||
|
||||
public ?int $vendor_contact_id = null;
|
||||
|
||||
public ?string $email_template_body = null;
|
||||
|
||||
public ?string $email_template_subject = null;
|
||||
|
||||
public ?string $html_template = null;
|
||||
|
||||
public ?string $text_template = 'email.template.text';
|
||||
|
||||
public array $headers = [];
|
||||
|
||||
public ?string $invitation_key = null;
|
||||
|
||||
public ?int $entity_id = null;
|
||||
|
||||
public ?string $entity_class = null;
|
||||
|
||||
public array $variables = [];
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
211
openapi/components.yaml
Normal file
211
openapi/components.yaml
Normal file
@ -0,0 +1,211 @@
|
||||
components:
|
||||
parameters:
|
||||
X-API-SECRET:
|
||||
name: X-API-SECRET
|
||||
in: header
|
||||
description: 'The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route.'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: password
|
||||
X-Requested-With:
|
||||
name: X-Requested-With
|
||||
in: header
|
||||
description: 'Used to send the XMLHttpRequest header'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
readOnly: true
|
||||
example: XMLHttpRequest
|
||||
X-API-TOKEN:
|
||||
name: X-API-TOKEN
|
||||
in: header
|
||||
description: 'The API token to be used for authentication'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: TOKEN
|
||||
X-API-PASSWORD:
|
||||
name: X-API-PASSWORD
|
||||
in: header
|
||||
description: 'The login password when challenged on certain protected routes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: supersecretpassword
|
||||
bank_integration_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the BankIntegration object. Format is comma separated.
|
||||
require: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
company:
|
||||
value: company
|
||||
summary: The associated Company
|
||||
account:
|
||||
value: account
|
||||
summary: The associated Account
|
||||
bank_transactions:
|
||||
value: bank_transactions
|
||||
summary: The associated Bank Transactions
|
||||
client_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relationships of the Client Object.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
activities:
|
||||
value: activities
|
||||
summary: include=activities will include the activities object in the response
|
||||
ledger:
|
||||
value: ledger
|
||||
summary: include=ledger will include the ledger object in the response
|
||||
system_logs:
|
||||
value: system_logs
|
||||
summary: include=system_logs will include the system_logs object in the response
|
||||
activity_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
history:
|
||||
value: history
|
||||
summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity)
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
client:
|
||||
value: client
|
||||
summary: include=client will include the client object in the response
|
||||
recurring_invoice:
|
||||
value: recurring_invoice
|
||||
summary: include=recurring_invoice will include the recurring_invoice object in the response
|
||||
invoice:
|
||||
value: invoice
|
||||
summary: include=invoice will include the invoice object in the response
|
||||
credit:
|
||||
value: credit
|
||||
summary: include=credit will include the credit object in the response
|
||||
quote:
|
||||
value: quote
|
||||
summary: include=quote will include the quote object in the response
|
||||
payment:
|
||||
value: payment
|
||||
summary: include=payment will include the payment object in the response
|
||||
expense:
|
||||
value: expense
|
||||
summary: include=expense will include the expense object in the response
|
||||
vendor_contact:
|
||||
value: vendor_contact
|
||||
summary: include=vendor_contact will include the vendor_contact object in the response
|
||||
vendor:
|
||||
value: vendor
|
||||
summary: include=vendor will include the vendor object in the response
|
||||
purchase_order:
|
||||
value: purchase_order
|
||||
summary: include=purchase_order will include the purchase_order object in the response
|
||||
task:
|
||||
value: task
|
||||
summary: include=task will include the task object in the response
|
||||
login_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
company:
|
||||
value: company
|
||||
summary: include=company will include the company object in the response
|
||||
token:
|
||||
value: token
|
||||
summary: include=token will include the token object in the response
|
||||
account:
|
||||
value: account
|
||||
summary: include=account will include the account object in the response
|
||||
per_page_meta:
|
||||
name: per_page
|
||||
in: query
|
||||
description: The number of records to return for each request, default is 20
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 20
|
||||
page_meta:
|
||||
name: page
|
||||
in: query
|
||||
description: The page number to return for this request (when performing pagination), default is 1
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 1
|
||||
include:
|
||||
name: include
|
||||
in: query
|
||||
description: 'Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 'first_load'
|
||||
include_static:
|
||||
name: include_static
|
||||
in: query
|
||||
description: 'Returns static variables'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: include_static=true
|
||||
clear_cache:
|
||||
name: clear_cache
|
||||
in: query
|
||||
description: 'Clears the static cache'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: clear_cache=true
|
||||
index:
|
||||
name: index
|
||||
in: query
|
||||
description: 'Replaces the default response index from data to a user specific string'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: user
|
||||
api_version:
|
||||
name: api_version
|
||||
in: query
|
||||
description: 'The API version'
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
example: user
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
description: 'The API version'
|
||||
schema:
|
||||
type: number
|
||||
X-RateLimit-Remaining:
|
||||
description: 'The number of requests left for the time window.'
|
||||
schema:
|
||||
type: integer
|
||||
X-RateLimit-Limit:
|
||||
description: 'The total number of requests in a given time window.'
|
||||
schema:
|
||||
type: integer
|
||||
components:
|
||||
securitySchemes:
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: X-API-TOKEN
|
@ -1,222 +1,5 @@
|
||||
components:
|
||||
schemas:
|
||||
Account:
|
||||
properties:
|
||||
id:
|
||||
description: 'The account hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
type: object
|
||||
Activity:
|
||||
properties:
|
||||
id:
|
||||
description: 'The id field of the activity'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
activity_type_id:
|
||||
description: 'The activity type id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
invoice_id:
|
||||
description: 'The invoice hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
payment_id:
|
||||
description: 'The payment hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
credit_id:
|
||||
description: 'The credit hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
updated_at:
|
||||
description: 'Unixtimestamp the last time the record was updated'
|
||||
type: integer
|
||||
example: '343421434'
|
||||
expense_id:
|
||||
description: 'The expense hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
is_system:
|
||||
description: 'Defines is the activity was performed by the system'
|
||||
type: boolean
|
||||
example: true
|
||||
contact_id:
|
||||
description: 'The contact hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
task_id:
|
||||
description: 'The task hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
notes:
|
||||
description: 'Activity Notes'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
token_id:
|
||||
description: 'The hashed ID of the token who performed the action'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
ip:
|
||||
description: 'The IP Address of the user who performed the action'
|
||||
type: string
|
||||
example: 192.168.1.252
|
||||
user:
|
||||
$ref: '#/components/schemas/User'
|
||||
client:
|
||||
$ref: '#/components/schemas/Client'
|
||||
contact:
|
||||
$ref: '#/components/schemas/ClientContact'
|
||||
recurring_invoice:
|
||||
$ref: '#/components/schemas/RecurringInvoice'
|
||||
invoice:
|
||||
$ref: '#/components/schemas/Invoice'
|
||||
credit:
|
||||
$ref: '#/components/schemas/Credit'
|
||||
quote:
|
||||
$ref: '#/components/schemas/Quote'
|
||||
payment:
|
||||
$ref: '#/components/schemas/Payment'
|
||||
expense:
|
||||
$ref: '#/components/schemas/Expense'
|
||||
task:
|
||||
$ref: '#/components/schemas/Task'
|
||||
purchase_order:
|
||||
$ref: '#/components/schemas/PurchaseOrder'
|
||||
vendor:
|
||||
$ref: '#/components/schemas/Vendor'
|
||||
vendor_contact:
|
||||
$ref: '#/components/schemas/VendorContact'
|
||||
type: object
|
||||
BTRules:
|
||||
properties:
|
||||
data_key:
|
||||
description: 'The key to search'
|
||||
type: string
|
||||
example: 'description,amount'
|
||||
operator:
|
||||
description: 'The operator flag of the search'
|
||||
type: string
|
||||
example: '>'
|
||||
value:
|
||||
description: 'The value to search for'
|
||||
type: string
|
||||
example: bob
|
||||
type: object
|
||||
BankIntegration:
|
||||
properties:
|
||||
id:
|
||||
description: 'The bank integration hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
provider_bank_name:
|
||||
description: 'The providers bank name'
|
||||
type: string
|
||||
example: 'Chase Bank'
|
||||
bank_account_id:
|
||||
description: 'The bank account id'
|
||||
type: integer
|
||||
example: '1233434'
|
||||
bank_account_name:
|
||||
description: 'The name of the account'
|
||||
type: string
|
||||
example: 'My Checking Acc'
|
||||
bank_account_number:
|
||||
description: 'The account number'
|
||||
type: string
|
||||
example: '111 234 2332'
|
||||
bank_account_status:
|
||||
description: 'The status of the bank account'
|
||||
type: string
|
||||
example: ACTIVE
|
||||
bank_account_type:
|
||||
description: 'The type of account'
|
||||
type: string
|
||||
example: CREDITCARD
|
||||
balance:
|
||||
description: 'The current bank balance if available'
|
||||
type: number
|
||||
example: '1000000'
|
||||
currency:
|
||||
description: 'iso_3166_3 code'
|
||||
type: string
|
||||
example: USD
|
||||
type: object
|
||||
BankTransaction:
|
||||
properties:
|
||||
id:
|
||||
description: 'The bank integration hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
transaction_id:
|
||||
description: 'The id of the transaction rule'
|
||||
type: integer
|
||||
example: 343434
|
||||
amount:
|
||||
description: 'The transaction amount'
|
||||
type: number
|
||||
example: 10
|
||||
currency_id:
|
||||
description: 'The currency ID of the currency'
|
||||
type: string
|
||||
example: '1'
|
||||
account_type:
|
||||
description: 'The account type'
|
||||
type: string
|
||||
example: creditCard
|
||||
description:
|
||||
description: 'The description of the transaction'
|
||||
type: string
|
||||
example: 'Potato purchases for kevin'
|
||||
category_id:
|
||||
description: 'The category id'
|
||||
type: integer
|
||||
example: 1
|
||||
category_type:
|
||||
description: 'The category description'
|
||||
type: string
|
||||
example: Expenses
|
||||
base_type:
|
||||
description: 'Either CREDIT or DEBIT'
|
||||
type: string
|
||||
example: CREDIT
|
||||
date:
|
||||
description: 'The date of the transaction'
|
||||
type: string
|
||||
example: '2022-09-01'
|
||||
bank_account_id:
|
||||
description: 'The ID number of the bank account'
|
||||
type: integer
|
||||
example: '1'
|
||||
type: object
|
||||
|
||||
BankTransactionRule:
|
||||
properties:
|
||||
id:
|
||||
@ -3816,9 +3599,9 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
description: 'These credentials do not match our records'
|
||||
description: 'These credentials do not match our records / Invalid Token'
|
||||
type: string
|
||||
example: 'These credentials do not match our records'
|
||||
example: 'These credentials do not match our records / Invalid Token'
|
||||
ValidationError:
|
||||
properties:
|
||||
message:
|
||||
@ -3833,6 +3616,20 @@ components:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
AuthorizationError:
|
||||
properties:
|
||||
message:
|
||||
description: 'Insufficient permissions for this resource.'
|
||||
type: string
|
||||
example: 'Insufficient permissions for this resource.'
|
||||
errors:
|
||||
properties:
|
||||
value:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
VendorContact:
|
||||
properties:
|
||||
id:
|
||||
@ -4049,197 +3846,4 @@ components:
|
||||
description: 'JSON or UBL'
|
||||
type: string
|
||||
example: JSON
|
||||
type: object
|
||||
parameters:
|
||||
X-API-SECRET:
|
||||
name: X-API-SECRET
|
||||
in: header
|
||||
description: 'The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route.'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: password
|
||||
X-Requested-With:
|
||||
name: X-Requested-With
|
||||
in: header
|
||||
description: 'Used to send the XMLHttpRequest header'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
readOnly: true
|
||||
example: XMLHttpRequest
|
||||
X-API-TOKEN:
|
||||
name: X-API-TOKEN
|
||||
in: header
|
||||
description: 'The API token to be used for authentication'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: TOKEN
|
||||
X-API-PASSWORD:
|
||||
name: X-API-PASSWORD
|
||||
in: header
|
||||
description: 'The login password when challenged on certain protected routes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: supersecretpassword
|
||||
bank_integration_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the BankIntegration object. Format is comma separated.
|
||||
require: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
company:
|
||||
value: company
|
||||
summary: The associated Company
|
||||
account:
|
||||
value: account
|
||||
summary: The associated Account
|
||||
bank_transactions:
|
||||
value: bank_transactions
|
||||
summary: The associated Bank Transactions
|
||||
activity_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
history:
|
||||
value: history
|
||||
summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity)
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
client:
|
||||
value: client
|
||||
summary: include=client will include the client object in the response
|
||||
recurring_invoice:
|
||||
value: recurring_invoice
|
||||
summary: include=recurring_invoice will include the recurring_invoice object in the response
|
||||
invoice:
|
||||
value: invoice
|
||||
summary: include=invoice will include the invoice object in the response
|
||||
credit:
|
||||
value: credit
|
||||
summary: include=credit will include the credit object in the response
|
||||
quote:
|
||||
value: quote
|
||||
summary: include=quote will include the quote object in the response
|
||||
payment:
|
||||
value: payment
|
||||
summary: include=payment will include the payment object in the response
|
||||
expense:
|
||||
value: expense
|
||||
summary: include=expense will include the expense object in the response
|
||||
vendor_contact:
|
||||
value: vendor_contact
|
||||
summary: include=vendor_contact will include the vendor_contact object in the response
|
||||
vendor:
|
||||
value: vendor
|
||||
summary: include=vendor will include the vendor object in the response
|
||||
purchase_order:
|
||||
value: purchase_order
|
||||
summary: include=purchase_order will include the purchase_order object in the response
|
||||
task:
|
||||
value: task
|
||||
summary: include=task will include the task object in the response
|
||||
login_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
company:
|
||||
value: company
|
||||
summary: include=company will include the company object in the response
|
||||
token:
|
||||
value: token
|
||||
summary: include=token will include the token object in the response
|
||||
account:
|
||||
value: account
|
||||
summary: include=account will include the account object in the response
|
||||
per_page_meta:
|
||||
name: per_page
|
||||
in: query
|
||||
description: The number of records to return for each request, default is 20
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 20
|
||||
page_meta:
|
||||
name: page
|
||||
in: query
|
||||
description: The page number to return for this request (when performing pagination), default is 1
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 1
|
||||
include:
|
||||
name: include
|
||||
in: query
|
||||
description: 'Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 'first_load'
|
||||
include_static:
|
||||
name: include_static
|
||||
in: query
|
||||
description: 'Returns static variables'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: include_static=true
|
||||
clear_cache:
|
||||
name: clear_cache
|
||||
in: query
|
||||
description: 'Clears the static cache'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: clear_cache=true
|
||||
index:
|
||||
name: index
|
||||
in: query
|
||||
description: 'Replaces the default response index from data to a user specific string'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: user
|
||||
api_version:
|
||||
name: api_version
|
||||
in: query
|
||||
description: 'The API version'
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
example: user
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
description: 'The API version'
|
||||
schema:
|
||||
type: number
|
||||
X-RateLimit-Remaining:
|
||||
description: 'The number of requests left for the time window.'
|
||||
schema:
|
||||
type: integer
|
||||
X-RateLimit-Limit:
|
||||
description: 'The total number of requests in a given time window.'
|
||||
schema:
|
||||
type: integer
|
||||
components:
|
||||
securitySchemes:
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: X-API-TOKEN
|
||||
type: object
|
11
openapi/components/schemas/account.yaml
Normal file
11
openapi/components/schemas/account.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
Account:
|
||||
properties:
|
||||
id:
|
||||
description: 'The account hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
account_sms_verified:
|
||||
description: 'Boolean flag if the account has been verified by sms'
|
||||
type: string
|
||||
example: true
|
||||
type: object
|
93
openapi/components/schemas/activity.yaml
Normal file
93
openapi/components/schemas/activity.yaml
Normal file
@ -0,0 +1,93 @@
|
||||
Activity:
|
||||
properties:
|
||||
id:
|
||||
description: 'The id field of the activity'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
activity_type_id:
|
||||
description: 'The activity type id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
invoice_id:
|
||||
description: 'The invoice hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
payment_id:
|
||||
description: 'The payment hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
credit_id:
|
||||
description: 'The credit hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
updated_at:
|
||||
description: 'Unixtimestamp the last time the record was updated'
|
||||
type: integer
|
||||
example: '343421434'
|
||||
expense_id:
|
||||
description: 'The expense hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
is_system:
|
||||
description: 'Defines is the activity was performed by the system'
|
||||
type: boolean
|
||||
example: true
|
||||
contact_id:
|
||||
description: 'The contact hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
task_id:
|
||||
description: 'The task hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
notes:
|
||||
description: 'Activity Notes'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
token_id:
|
||||
description: 'The hashed ID of the token who performed the action'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
ip:
|
||||
description: 'The IP Address of the user who performed the action'
|
||||
type: string
|
||||
example: 192.168.1.252
|
||||
user:
|
||||
$ref: '#/components/schemas/User'
|
||||
client:
|
||||
$ref: '#/components/schemas/Client'
|
||||
contact:
|
||||
$ref: '#/components/schemas/ClientContact'
|
||||
recurring_invoice:
|
||||
$ref: '#/components/schemas/RecurringInvoice'
|
||||
invoice:
|
||||
$ref: '#/components/schemas/Invoice'
|
||||
credit:
|
||||
$ref: '#/components/schemas/Credit'
|
||||
quote:
|
||||
$ref: '#/components/schemas/Quote'
|
||||
payment:
|
||||
$ref: '#/components/schemas/Payment'
|
||||
expense:
|
||||
$ref: '#/components/schemas/Expense'
|
||||
task:
|
||||
$ref: '#/components/schemas/Task'
|
||||
purchase_order:
|
||||
$ref: '#/components/schemas/PurchaseOrder'
|
||||
vendor:
|
||||
$ref: '#/components/schemas/Vendor'
|
||||
vendor_contact:
|
||||
$ref: '#/components/schemas/VendorContact'
|
||||
type: object
|
47
openapi/components/schemas/bank_integration.yaml
Normal file
47
openapi/components/schemas/bank_integration.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
BankIntegration:
|
||||
properties:
|
||||
id:
|
||||
description: 'The bank integration hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
provider_bank_name:
|
||||
description: 'The providers bank name'
|
||||
type: string
|
||||
example: 'Chase Bank'
|
||||
bank_account_id:
|
||||
description: 'The bank account id'
|
||||
type: integer
|
||||
example: '1233434'
|
||||
bank_account_name:
|
||||
description: 'The name of the account'
|
||||
type: string
|
||||
example: 'My Checking Acc'
|
||||
bank_account_number:
|
||||
description: 'The account number'
|
||||
type: string
|
||||
example: '111 234 2332'
|
||||
bank_account_status:
|
||||
description: 'The status of the bank account'
|
||||
type: string
|
||||
example: ACTIVE
|
||||
bank_account_type:
|
||||
description: 'The type of account'
|
||||
type: string
|
||||
example: CREDITCARD
|
||||
balance:
|
||||
description: 'The current bank balance if available'
|
||||
type: number
|
||||
example: '1000000'
|
||||
currency:
|
||||
description: 'iso_3166_3 code'
|
||||
type: string
|
||||
example: USD
|
||||
type: object
|
55
openapi/components/schemas/bank_transaction.yaml
Normal file
55
openapi/components/schemas/bank_transaction.yaml
Normal file
@ -0,0 +1,55 @@
|
||||
BankTransaction:
|
||||
properties:
|
||||
id:
|
||||
description: 'The bank integration hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
user_id:
|
||||
description: 'The user hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
transaction_id:
|
||||
description: 'The id of the transaction rule'
|
||||
type: integer
|
||||
example: 343434
|
||||
amount:
|
||||
description: 'The transaction amount'
|
||||
type: number
|
||||
example: 10
|
||||
currency_id:
|
||||
description: 'The currency ID of the currency'
|
||||
type: string
|
||||
example: '1'
|
||||
account_type:
|
||||
description: 'The account type'
|
||||
type: string
|
||||
example: creditCard
|
||||
description:
|
||||
description: 'The description of the transaction'
|
||||
type: string
|
||||
example: 'Potato purchases for kevin'
|
||||
category_id:
|
||||
description: 'The category id'
|
||||
type: integer
|
||||
example: 1
|
||||
category_type:
|
||||
description: 'The category description'
|
||||
type: string
|
||||
example: Expenses
|
||||
base_type:
|
||||
description: 'Either CREDIT or DEBIT'
|
||||
type: string
|
||||
example: CREDIT
|
||||
date:
|
||||
description: 'The date of the transaction'
|
||||
type: string
|
||||
example: '2022-09-01'
|
||||
bank_account_id:
|
||||
description: 'The ID number of the bank account'
|
||||
type: integer
|
||||
example: '1'
|
||||
type: object
|
15
openapi/components/schemas/btrules.yaml
Normal file
15
openapi/components/schemas/btrules.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
BTRules:
|
||||
properties:
|
||||
data_key:
|
||||
description: 'The key to search'
|
||||
type: string
|
||||
example: 'description,amount'
|
||||
operator:
|
||||
description: 'The operator flag of the search'
|
||||
type: string
|
||||
example: '>'
|
||||
value:
|
||||
description: 'The value to search for'
|
||||
type: string
|
||||
example: bob
|
||||
type: object
|
@ -1,6 +1,6 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: 'Invoice Ninja API Reference - Where self host Invoicing lives.'
|
||||
title: 'Invoice Ninja API Reference - Where self host invoicing lives.'
|
||||
description: |
|
||||
---
|
||||
<br>
|
||||
@ -15,7 +15,7 @@ info:
|
||||
license:
|
||||
name: 'Elastic License'
|
||||
url: 'https://www.elastic.co/licensing/elastic-license'
|
||||
version: 1.0.30
|
||||
version: 5.5.70
|
||||
servers:
|
||||
-
|
||||
url: 'https://demo.invoiceninja.com'
|
||||
|
@ -1541,519 +1541,7 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/clients:
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'List clients'
|
||||
description: |
|
||||
Lists clients, search and filters allow fine grained lists to be generated.
|
||||
|
||||
Query parameters can be added to performed more fine grained filtering of the clients, these are handled by the ClientFilters class which defines the methods available
|
||||
operationId: getClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
responses:
|
||||
200:
|
||||
description: 'A list of clients'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Create client'
|
||||
description: 'Adds an client to a company'
|
||||
operationId: storeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the saved client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}':
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Show client'
|
||||
description: 'Displays a client by id'
|
||||
operationId: showClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the cl.ient object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
delete:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Delete client'
|
||||
description: 'Handles the deletion of a client by id'
|
||||
operationId: deleteClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns a HTTP status'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/edit':
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Edit Client'
|
||||
description: 'Displays a client by id'
|
||||
operationId: editClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/clients/create:
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Blank Client'
|
||||
description: 'Returns a blank object with default values'
|
||||
operationId: getClientsCreate
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
responses:
|
||||
200:
|
||||
description: 'A blank client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/clients/bulk:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Bulk actions'
|
||||
description: ''
|
||||
operationId: bulkClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
requestBody:
|
||||
description: 'User credentials'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: 'Array of hashed IDs to be bulk ''actioned'
|
||||
type: integer
|
||||
example: '[0,1,2,3]'
|
||||
responses:
|
||||
200:
|
||||
description: 'The Client User response'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/upload':
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Add client document'
|
||||
description: 'Handles the uploading of a document to a client'
|
||||
operationId: uploadClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/purge':
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Purge client'
|
||||
description: 'Handles purging a client'
|
||||
operationId: purgeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge':
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Merge client'
|
||||
description: 'Handles merging 2 clients'
|
||||
operationId: mergeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
-
|
||||
name: mergeable_client_hashed_id
|
||||
in: path
|
||||
description: 'The Mergeable Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/client_gateway_tokens:
|
||||
get:
|
||||
tags:
|
||||
@ -2365,69 +1853,7 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/client_statement:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Client statement PDF'
|
||||
description: 'Return a PDF of the client statement'
|
||||
operationId: clientStatement
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
requestBody:
|
||||
description: 'Statment Options'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
start_date:
|
||||
description: 'The start date of the statement period - format Y-m-d'
|
||||
type: string
|
||||
end_date:
|
||||
description: 'The start date of the statement period - format Y-m-d'
|
||||
type: string
|
||||
client_id:
|
||||
description: 'The hashed ID of the client'
|
||||
type: string
|
||||
show_payments_table:
|
||||
description: 'Flag which determines if the payments table is shown'
|
||||
type: boolean
|
||||
show_aging_table:
|
||||
description: 'Flag which determines if the aging table is shown'
|
||||
type: boolean
|
||||
type: object
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
|
||||
/api/v1/companies:
|
||||
get:
|
||||
tags:
|
783
openapi/paths/clients.yaml
Normal file
783
openapi/paths/clients.yaml
Normal file
@ -0,0 +1,783 @@
|
||||
/api/v1/clients:
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'List clients'
|
||||
description: |
|
||||
Lists clients. Fine grained filtering is also available using query parameters.
|
||||
operationId: getClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
-
|
||||
name: name
|
||||
in: query
|
||||
description: Filter by client name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob
|
||||
-
|
||||
name: balance
|
||||
in: query
|
||||
description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: lt:10
|
||||
-
|
||||
name: between_balance
|
||||
in: query
|
||||
description: Filter between client balances, format uses two values separated by a colon
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 10:100
|
||||
-
|
||||
name: email
|
||||
in: query
|
||||
description: Filter by client email
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob@gmail.com
|
||||
-
|
||||
name: id_number
|
||||
in: query
|
||||
description: Filter by client id_number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: number
|
||||
in: query
|
||||
description: Filter by client number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: filter
|
||||
in: query
|
||||
description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc name|desc balance|asc
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: 'A list of clients'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Create client'
|
||||
description: 'Adds an client to a company'
|
||||
operationId: storeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the saved client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}':
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Show client'
|
||||
description: 'Displays a client by id'
|
||||
operationId: showClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the cl.ient object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
delete:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Delete client'
|
||||
description: 'Handles the deletion of a client by id'
|
||||
operationId: deleteClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns a HTTP status'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/edit':
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Edit Client'
|
||||
description: 'Displays a client by id'
|
||||
operationId: editClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/clients/create:
|
||||
get:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Blank Client'
|
||||
description: 'Returns a blank object with default values'
|
||||
operationId: getClientsCreate
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'A blank client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/clients/bulk:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Bulk actions'
|
||||
description: ''
|
||||
operationId: bulkClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
requestBody:
|
||||
description: 'User credentials'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: 'Array of hashed IDs to be bulk ''actioned'
|
||||
type: integer
|
||||
example: '[0,1,2,3]'
|
||||
responses:
|
||||
200:
|
||||
description: 'The Client User response'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/upload':
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Add client document'
|
||||
description: 'Handles the uploading of a document to a client'
|
||||
operationId: uploadClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/purge':
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Purge client'
|
||||
description: 'Handles purging a client'
|
||||
operationId: purgeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge':
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Merge client'
|
||||
description: 'Handles merging 2 clients'
|
||||
operationId: mergeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
-
|
||||
name: mergeable_client_hashed_id
|
||||
in: path
|
||||
description: 'The Mergeable Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/client_statement:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Client statement PDF'
|
||||
description: 'Return a PDF of the client statement'
|
||||
operationId: clientStatement
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
requestBody:
|
||||
description: 'Statment Options'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
start_date:
|
||||
description: 'The start date of the statement period - format Y-m-d'
|
||||
type: string
|
||||
end_date:
|
||||
description: 'The start date of the statement period - format Y-m-d'
|
||||
type: string
|
||||
client_id:
|
||||
description: 'The hashed ID of the client'
|
||||
type: string
|
||||
show_payments_table:
|
||||
description: 'Flag which determines if the payments table is shown'
|
||||
type: boolean
|
||||
show_aging_table:
|
||||
description: 'Flag which determines if the aging table is shown'
|
||||
type: boolean
|
||||
type: object
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
@ -3,6 +3,6 @@
|
||||
<h1>{{ ctrans('texts.login_link_requested_label') }}</h1>
|
||||
<p>{{ ctrans('texts.login_link_requested') }}</p>
|
||||
|
||||
<a href="{{ $url }}" target="_blank" class="button">Sign in to Invoice Ninja</a>
|
||||
<a href="{{ $url }}" target="_blank" class="button"> {{ ctrans('texts.login')}}</a>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
Loading…
Reference in New Issue
Block a user