-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
21761 lines (19192 loc) · 911 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>InvoiceShelf Invoice API Documentation</title>
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/site.webmanifest">
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5851d8">
<link rel="shortcut icon" href="favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-config" content="favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="css/theme.style.css" media="screen">
<link rel="stylesheet" href="css/theme.print.css" media="print">
<link rel="stylesheet" href="custom.css">
<link rel="stylesheet" href="dracula.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script src="https://unpkg.com/@highlightjs/[email protected]/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
<style id="language-style">
/* starts out as display none and is replaced with js later */
body .content .bash-example code {
display: none;
}
body .content .javascript-example code {
display: none;
}
body .content .php-example code {
display: none;
}
</style>
<script src="js/theme.js"></script>
</head>
<body data-languages="["bash","javascript","php"]">
<a href="#" id="nav-button">
<span>
MENU
<img src="images/navbar.png" alt="navbar-image"/>
</span>
</a>
<div class="tocify-wrapper">
<img src="logo.png" alt="logo" class="logo" style="padding-top: 10px;"/>
<div class="lang-selector">
<button type="button" class="lang-button" data-language-name="bash">bash</button>
<button type="button" class="lang-button" data-language-name="javascript">javascript</button>
<button type="button" class="lang-button" data-language-name="php">php</button>
</div>
<div class="search">
<input type="text" class="search" id="input-search" placeholder="Search">
</div>
<div id="toc">
<ul id="tocify-header-0" class="tocify-header">
<li class="tocify-item level-1" data-unique="introduction">
<a href="#introduction">Introduction</a>
</li>
</ul>
<ul id="tocify-header-1" class="tocify-header">
<li class="tocify-item level-1" data-unique="authenticating-requests">
<a href="#authenticating-requests">Authenticating requests</a>
</li>
</ul>
<ul id="tocify-header-2" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-authentication">
<a href="#admin-authentication">Admin / Authentication</a>
</li>
<ul id="tocify-subheader-admin-authentication" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-authentication-POSTapi-v1-auth-login">
<a href="#admin-authentication-POSTapi-v1-auth-login">Login</a>
</li>
<li class="tocify-item level-2" data-unique="admin-authentication-POSTapi-v1-auth-logout">
<a href="#admin-authentication-POSTapi-v1-auth-logout">Logout</a>
</li>
<li class="tocify-item level-2" data-unique="admin-authentication-GETapi-v1-auth-check">
<a href="#admin-authentication-GETapi-v1-auth-check">Token Validity Check</a>
</li>
</ul>
</ul>
<ul id="tocify-header-3" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-backups">
<a href="#admin-backups">Admin / Backups</a>
</li>
<ul id="tocify-subheader-admin-backups" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-backups-GETapi-v1-backups">
<a href="#admin-backups-GETapi-v1-backups">List all backups</a>
</li>
<li class="tocify-item level-2" data-unique="admin-backups-POSTapi-v1-backups">
<a href="#admin-backups-POSTapi-v1-backups">Create a backup</a>
</li>
<li class="tocify-item level-2" data-unique="admin-backups-DELETEapi-v1-backups--id-">
<a href="#admin-backups-DELETEapi-v1-backups--id-">Delete a backup</a>
</li>
</ul>
</ul>
<ul id="tocify-header-4" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-companies">
<a href="#admin-companies">Admin / Companies</a>
</li>
<ul id="tocify-subheader-admin-companies" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-companies-GETapi-v1-current-company">
<a href="#admin-companies-GETapi-v1-current-company">Retrieve a company</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-PUTapi-v1-company">
<a href="#admin-companies-PUTapi-v1-company">Update a company</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-POSTapi-v1-company-upload-logo">
<a href="#admin-companies-POSTapi-v1-company-upload-logo">Upload company logo</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-GETapi-v1-company-settings">
<a href="#admin-companies-GETapi-v1-company-settings">Get company settings</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-POSTapi-v1-company-settings">
<a href="#admin-companies-POSTapi-v1-company-settings">Update company settings</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-POSTapi-v1-companies">
<a href="#admin-companies-POSTapi-v1-companies">Create a company</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-POSTapi-v1-transfer-ownership--user-">
<a href="#admin-companies-POSTapi-v1-transfer-ownership--user-">Transfer company ownership</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-POSTapi-v1-companies-delete">
<a href="#admin-companies-POSTapi-v1-companies-delete">Delete a company</a>
</li>
<li class="tocify-item level-2" data-unique="admin-companies-GETapi-v1-companies">
<a href="#admin-companies-GETapi-v1-companies">List all companies</a>
</li>
</ul>
</ul>
<ul id="tocify-header-5" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-currencies">
<a href="#admin-currencies">Admin / Currencies</a>
</li>
<ul id="tocify-subheader-admin-currencies" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-currencies-GETapi-v1-currencies--currency--exchange-rate">
<a href="#admin-currencies-GETapi-v1-currencies--currency--exchange-rate">Get exchange rate of a given currency</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-GETapi-v1-currencies--currency--active-provider">
<a href="#admin-currencies-GETapi-v1-currencies--currency--active-provider">Check if a given currency has a exchange rate provider configured.</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-GETapi-v1-exchange-rate-providers">
<a href="#admin-currencies-GETapi-v1-exchange-rate-providers">List all exchange rate providers</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-POSTapi-v1-exchange-rate-providers">
<a href="#admin-currencies-POSTapi-v1-exchange-rate-providers">Create an exchange rate provider</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-GETapi-v1-exchange-rate-providers--id-">
<a href="#admin-currencies-GETapi-v1-exchange-rate-providers--id-">Retrieve an exchange rate provider</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-PUTapi-v1-exchange-rate-providers--id-">
<a href="#admin-currencies-PUTapi-v1-exchange-rate-providers--id-">Update an exchange rate provider</a>
</li>
<li class="tocify-item level-2" data-unique="admin-currencies-DELETEapi-v1-exchange-rate-providers--id-">
<a href="#admin-currencies-DELETEapi-v1-exchange-rate-providers--id-">Delete an exchange rate provider</a>
</li>
</ul>
</ul>
<ul id="tocify-header-6" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-custom-fields">
<a href="#admin-custom-fields">Admin / Custom Fields</a>
</li>
<ul id="tocify-subheader-admin-custom-fields" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-custom-fields-GETapi-v1-custom-fields">
<a href="#admin-custom-fields-GETapi-v1-custom-fields">List all custom fields</a>
</li>
<li class="tocify-item level-2" data-unique="admin-custom-fields-POSTapi-v1-custom-fields">
<a href="#admin-custom-fields-POSTapi-v1-custom-fields">Create a custom field</a>
</li>
<li class="tocify-item level-2" data-unique="admin-custom-fields-GETapi-v1-custom-fields--id-">
<a href="#admin-custom-fields-GETapi-v1-custom-fields--id-">Retrieve a custom field</a>
</li>
<li class="tocify-item level-2" data-unique="admin-custom-fields-PUTapi-v1-custom-fields--id-">
<a href="#admin-custom-fields-PUTapi-v1-custom-fields--id-">Update a custom field</a>
</li>
<li class="tocify-item level-2" data-unique="admin-custom-fields-DELETEapi-v1-custom-fields--id-">
<a href="#admin-custom-fields-DELETEapi-v1-custom-fields--id-">Delete a custom field</a>
</li>
</ul>
</ul>
<ul id="tocify-header-7" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-customer">
<a href="#admin-customer">Admin / Customer</a>
</li>
<ul id="tocify-subheader-admin-customer" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-customer-GETapi-v1-customers--customer--stats">
<a href="#admin-customer-GETapi-v1-customers--customer--stats">Customer Stats</a>
</li>
<li class="tocify-item level-2" data-unique="admin-customer-GETapi-v1--company_slug--customer-dashboard">
<a href="#admin-customer-GETapi-v1--company_slug--customer-dashboard">Dashboard Stats</a>
</li>
</ul>
</ul>
<ul id="tocify-header-8" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-customers">
<a href="#admin-customers">Admin / Customers</a>
</li>
<ul id="tocify-subheader-admin-customers" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-customers-POSTapi-v1-customers-delete">
<a href="#admin-customers-POSTapi-v1-customers-delete">Delete customers</a>
</li>
<li class="tocify-item level-2" data-unique="admin-customers-GETapi-v1-customers">
<a href="#admin-customers-GETapi-v1-customers">List all customers</a>
</li>
<li class="tocify-item level-2" data-unique="admin-customers-POSTapi-v1-customers">
<a href="#admin-customers-POSTapi-v1-customers">Create a customer</a>
</li>
<li class="tocify-item level-2" data-unique="admin-customers-GETapi-v1-customers--id-">
<a href="#admin-customers-GETapi-v1-customers--id-">Retrieve a customer</a>
</li>
<li class="tocify-item level-2" data-unique="admin-customers-PUTapi-v1-customers--id-">
<a href="#admin-customers-PUTapi-v1-customers--id-">Update a customer</a>
</li>
</ul>
</ul>
<ul id="tocify-header-9" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-estimates">
<a href="#admin-estimates">Admin / Estimates</a>
</li>
<ul id="tocify-subheader-admin-estimates" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-estimates-GETapi-v1-estimates--estimate--send-preview">
<a href="#admin-estimates-GETapi-v1-estimates--estimate--send-preview">Preview an estimate email</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-POSTapi-v1-estimates--estimate--send">
<a href="#admin-estimates-POSTapi-v1-estimates--estimate--send">Send an estimate</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-POSTapi-v1-estimates--estimate--status">
<a href="#admin-estimates-POSTapi-v1-estimates--estimate--status">Update status of an estimate</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-POSTapi-v1-estimates--estimate--convert-to-invoice">
<a href="#admin-estimates-POSTapi-v1-estimates--estimate--convert-to-invoice">Convert an estimate into invoice.</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-GETapi-v1-estimates-templates">
<a href="#admin-estimates-GETapi-v1-estimates-templates">List all estimate templates</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-POSTapi-v1-estimates-delete">
<a href="#admin-estimates-POSTapi-v1-estimates-delete">Delete estimates</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-GETapi-v1-estimates">
<a href="#admin-estimates-GETapi-v1-estimates">List all estimates</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-POSTapi-v1-estimates">
<a href="#admin-estimates-POSTapi-v1-estimates">Create an estimate</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-GETapi-v1-estimates--id-">
<a href="#admin-estimates-GETapi-v1-estimates--id-">Retrieve an estimate</a>
</li>
<li class="tocify-item level-2" data-unique="admin-estimates-PUTapi-v1-estimates--id-">
<a href="#admin-estimates-PUTapi-v1-estimates--id-">Update an estimate</a>
</li>
</ul>
</ul>
<ul id="tocify-header-10" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-expense-categories">
<a href="#admin-expense-categories">Admin / Expense Categories</a>
</li>
<ul id="tocify-subheader-admin-expense-categories" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-expense-categories-GETapi-v1-categories">
<a href="#admin-expense-categories-GETapi-v1-categories">List all expense categories</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expense-categories-POSTapi-v1-categories">
<a href="#admin-expense-categories-POSTapi-v1-categories">Create an expense category</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expense-categories-GETapi-v1-categories--id-">
<a href="#admin-expense-categories-GETapi-v1-categories--id-">Retrieve an expense category</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expense-categories-PUTapi-v1-categories--id-">
<a href="#admin-expense-categories-PUTapi-v1-categories--id-">Update an expense category</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expense-categories-DELETEapi-v1-categories--id-">
<a href="#admin-expense-categories-DELETEapi-v1-categories--id-">Delete an expense category</a>
</li>
</ul>
</ul>
<ul id="tocify-header-11" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-expenses">
<a href="#admin-expenses">Admin / Expenses</a>
</li>
<ul id="tocify-subheader-admin-expenses" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-expenses-POSTapi-v1-expenses--expense--upload-receipts">
<a href="#admin-expenses-POSTapi-v1-expenses--expense--upload-receipts">Upload expense receipt</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expenses-POSTapi-v1-expenses-delete">
<a href="#admin-expenses-POSTapi-v1-expenses-delete">Delete expenses</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expenses-GETapi-v1-expenses">
<a href="#admin-expenses-GETapi-v1-expenses">List all expenses</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expenses-POSTapi-v1-expenses">
<a href="#admin-expenses-POSTapi-v1-expenses">Create an expense</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expenses-GETapi-v1-expenses--id-">
<a href="#admin-expenses-GETapi-v1-expenses--id-">Retrieve an expense</a>
</li>
<li class="tocify-item level-2" data-unique="admin-expenses-PUTapi-v1-expenses--id-">
<a href="#admin-expenses-PUTapi-v1-expenses--id-">Update an expense</a>
</li>
</ul>
</ul>
<ul id="tocify-header-12" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-file-disks">
<a href="#admin-file-disks">Admin / File Disks</a>
</li>
<ul id="tocify-subheader-admin-file-disks" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-file-disks-GETapi-v1-disks">
<a href="#admin-file-disks-GETapi-v1-disks">List all file disks</a>
</li>
<li class="tocify-item level-2" data-unique="admin-file-disks-POSTapi-v1-disks">
<a href="#admin-file-disks-POSTapi-v1-disks">Create a file disk</a>
</li>
<li class="tocify-item level-2" data-unique="admin-file-disks-GETapi-v1-disks--id-">
<a href="#admin-file-disks-GETapi-v1-disks--id-">Retrieve a file disk</a>
</li>
<li class="tocify-item level-2" data-unique="admin-file-disks-PUTapi-v1-disks--id-">
<a href="#admin-file-disks-PUTapi-v1-disks--id-">Update a file disk</a>
</li>
<li class="tocify-item level-2" data-unique="admin-file-disks-DELETEapi-v1-disks--id-">
<a href="#admin-file-disks-DELETEapi-v1-disks--id-">Remove the specified resource from storage.</a>
</li>
<li class="tocify-item level-2" data-unique="admin-file-disks-GETapi-v1-disk-drivers">
<a href="#admin-file-disks-GETapi-v1-disk-drivers">List all file disk drivers</a>
</li>
</ul>
</ul>
<ul id="tocify-header-13" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-general">
<a href="#admin-general">Admin / General</a>
</li>
<ul id="tocify-subheader-admin-general" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-bootstrap">
<a href="#admin-general-GETapi-v1-bootstrap">Bootstrap</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-dashboard">
<a href="#admin-general-GETapi-v1-dashboard">Dashboard Stats</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-search">
<a href="#admin-general-GETapi-v1-search">Search Customers or Users</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-config">
<a href="#admin-general-GETapi-v1-config">Get Config By Key</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-currencies">
<a href="#admin-general-GETapi-v1-currencies">Currencies</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-timezones">
<a href="#admin-general-GETapi-v1-timezones">Time Zones</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-date-formats">
<a href="#admin-general-GETapi-v1-date-formats">Date Formats</a>
</li>
<li class="tocify-item level-2" data-unique="admin-general-GETapi-v1-next-number">
<a href="#admin-general-GETapi-v1-next-number">Next Sequence Number</a>
</li>
</ul>
</ul>
<ul id="tocify-header-14" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-invoices">
<a href="#admin-invoices">Admin / Invoices</a>
</li>
<ul id="tocify-subheader-admin-invoices" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-invoices-GETapi-v1-invoices--invoice--send-preview">
<a href="#admin-invoices-GETapi-v1-invoices--invoice--send-preview">Preview an invoice email</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-POSTapi-v1-invoices--invoice--send">
<a href="#admin-invoices-POSTapi-v1-invoices--invoice--send">Send an invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-POSTapi-v1-invoices--invoice--clone">
<a href="#admin-invoices-POSTapi-v1-invoices--invoice--clone">Clone an invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-POSTapi-v1-invoices--invoice--status">
<a href="#admin-invoices-POSTapi-v1-invoices--invoice--status">Update status of an invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-POSTapi-v1-invoices-delete">
<a href="#admin-invoices-POSTapi-v1-invoices-delete">Delete invoices</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-GETapi-v1-invoices-templates">
<a href="#admin-invoices-GETapi-v1-invoices-templates">List all invoice templates</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-GETapi-v1-invoices">
<a href="#admin-invoices-GETapi-v1-invoices">List all invoices</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-POSTapi-v1-invoices">
<a href="#admin-invoices-POSTapi-v1-invoices">Create an invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-GETapi-v1-invoices--id-">
<a href="#admin-invoices-GETapi-v1-invoices--id-">Retrieve an invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-invoices-PUTapi-v1-invoices--id-">
<a href="#admin-invoices-PUTapi-v1-invoices--id-">Update an invoice</a>
</li>
</ul>
</ul>
<ul id="tocify-header-15" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-item-units">
<a href="#admin-item-units">Admin / Item Units</a>
</li>
<ul id="tocify-subheader-admin-item-units" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-item-units-GETapi-v1-units">
<a href="#admin-item-units-GETapi-v1-units">List all item units</a>
</li>
<li class="tocify-item level-2" data-unique="admin-item-units-POSTapi-v1-units">
<a href="#admin-item-units-POSTapi-v1-units">Create an item unit</a>
</li>
<li class="tocify-item level-2" data-unique="admin-item-units-GETapi-v1-units--id-">
<a href="#admin-item-units-GETapi-v1-units--id-">Retrieve an item unit</a>
</li>
<li class="tocify-item level-2" data-unique="admin-item-units-PUTapi-v1-units--id-">
<a href="#admin-item-units-PUTapi-v1-units--id-">Update an item unit</a>
</li>
<li class="tocify-item level-2" data-unique="admin-item-units-DELETEapi-v1-units--id-">
<a href="#admin-item-units-DELETEapi-v1-units--id-">Delete an item unit</a>
</li>
</ul>
</ul>
<ul id="tocify-header-16" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-items">
<a href="#admin-items">Admin / Items</a>
</li>
<ul id="tocify-subheader-admin-items" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-items-POSTapi-v1-items-delete">
<a href="#admin-items-POSTapi-v1-items-delete">Delete items</a>
</li>
<li class="tocify-item level-2" data-unique="admin-items-GETapi-v1-items">
<a href="#admin-items-GETapi-v1-items">List all items</a>
</li>
<li class="tocify-item level-2" data-unique="admin-items-POSTapi-v1-items">
<a href="#admin-items-POSTapi-v1-items">Create an item</a>
</li>
<li class="tocify-item level-2" data-unique="admin-items-GETapi-v1-items--id-">
<a href="#admin-items-GETapi-v1-items--id-">Retrieve an item</a>
</li>
<li class="tocify-item level-2" data-unique="admin-items-PUTapi-v1-items--id-">
<a href="#admin-items-PUTapi-v1-items--id-">Update an item</a>
</li>
</ul>
</ul>
<ul id="tocify-header-17" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-me">
<a href="#admin-me">Admin / Me</a>
</li>
<ul id="tocify-subheader-admin-me" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-me-GETapi-v1-me">
<a href="#admin-me-GETapi-v1-me">Retrieve current user account</a>
</li>
<li class="tocify-item level-2" data-unique="admin-me-PUTapi-v1-me">
<a href="#admin-me-PUTapi-v1-me">Update profile</a>
</li>
<li class="tocify-item level-2" data-unique="admin-me-GETapi-v1-me-settings">
<a href="#admin-me-GETapi-v1-me-settings">Get user settings</a>
</li>
<li class="tocify-item level-2" data-unique="admin-me-PUTapi-v1-me-settings">
<a href="#admin-me-PUTapi-v1-me-settings">Update user settings</a>
</li>
<li class="tocify-item level-2" data-unique="admin-me-POSTapi-v1-me-upload-avatar">
<a href="#admin-me-POSTapi-v1-me-upload-avatar">Upload avatar</a>
</li>
</ul>
</ul>
<ul id="tocify-header-18" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-notes">
<a href="#admin-notes">Admin / Notes</a>
</li>
<ul id="tocify-subheader-admin-notes" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-notes-GETapi-v1-notes">
<a href="#admin-notes-GETapi-v1-notes">List all notes</a>
</li>
<li class="tocify-item level-2" data-unique="admin-notes-POSTapi-v1-notes">
<a href="#admin-notes-POSTapi-v1-notes">Create a note</a>
</li>
<li class="tocify-item level-2" data-unique="admin-notes-GETapi-v1-notes--id-">
<a href="#admin-notes-GETapi-v1-notes--id-">Retrieve a note</a>
</li>
<li class="tocify-item level-2" data-unique="admin-notes-PUTapi-v1-notes--id-">
<a href="#admin-notes-PUTapi-v1-notes--id-">Update a note</a>
</li>
<li class="tocify-item level-2" data-unique="admin-notes-DELETEapi-v1-notes--id-">
<a href="#admin-notes-DELETEapi-v1-notes--id-">Delete a note</a>
</li>
</ul>
</ul>
<ul id="tocify-header-19" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-payment-methods">
<a href="#admin-payment-methods">Admin / Payment Methods</a>
</li>
<ul id="tocify-subheader-admin-payment-methods" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-payment-methods-GETapi-v1-payment-methods">
<a href="#admin-payment-methods-GETapi-v1-payment-methods">List all payment methods</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payment-methods-POSTapi-v1-payment-methods">
<a href="#admin-payment-methods-POSTapi-v1-payment-methods">Create a payment method</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payment-methods-GETapi-v1-payment-methods--id-">
<a href="#admin-payment-methods-GETapi-v1-payment-methods--id-">Retrieve a payment method</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payment-methods-PUTapi-v1-payment-methods--id-">
<a href="#admin-payment-methods-PUTapi-v1-payment-methods--id-">Update a payment method</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payment-methods-DELETEapi-v1-payment-methods--id-">
<a href="#admin-payment-methods-DELETEapi-v1-payment-methods--id-">Delete a payment method</a>
</li>
</ul>
</ul>
<ul id="tocify-header-20" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-payments">
<a href="#admin-payments">Admin / Payments</a>
</li>
<ul id="tocify-subheader-admin-payments" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-payments-GETapi-v1-payments--payment--send-preview">
<a href="#admin-payments-GETapi-v1-payments--payment--send-preview">Preview payment receipt email</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-POSTapi-v1-payments--payment--send">
<a href="#admin-payments-POSTapi-v1-payments--payment--send">Send payment receipt</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-POSTapi-v1-payments-delete">
<a href="#admin-payments-POSTapi-v1-payments-delete">Delete payments</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-GETapi-v1-payments">
<a href="#admin-payments-GETapi-v1-payments">List all payments</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-POSTapi-v1-payments">
<a href="#admin-payments-POSTapi-v1-payments">Create a payment</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-GETapi-v1-payments--id-">
<a href="#admin-payments-GETapi-v1-payments--id-">Retrieve a payment</a>
</li>
<li class="tocify-item level-2" data-unique="admin-payments-PUTapi-v1-payments--id-">
<a href="#admin-payments-PUTapi-v1-payments--id-">Update a payment</a>
</li>
</ul>
</ul>
<ul id="tocify-header-21" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-recurring-invoices">
<a href="#admin-recurring-invoices">Admin / Recurring Invoices</a>
</li>
<ul id="tocify-subheader-admin-recurring-invoices" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-GETapi-v1-recurring-invoice-frequency">
<a href="#admin-recurring-invoices-GETapi-v1-recurring-invoice-frequency">Get next invoice date by given frequency and start_date</a>
</li>
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-POSTapi-v1-recurring-invoices-delete">
<a href="#admin-recurring-invoices-POSTapi-v1-recurring-invoices-delete">Delete recurring invoices</a>
</li>
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-GETapi-v1-recurring-invoices">
<a href="#admin-recurring-invoices-GETapi-v1-recurring-invoices">List all recurring invoices</a>
</li>
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-POSTapi-v1-recurring-invoices">
<a href="#admin-recurring-invoices-POSTapi-v1-recurring-invoices">Create a recurring invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-GETapi-v1-recurring-invoices--id-">
<a href="#admin-recurring-invoices-GETapi-v1-recurring-invoices--id-">Retrieve a recurring invoice</a>
</li>
<li class="tocify-item level-2" data-unique="admin-recurring-invoices-PUTapi-v1-recurring-invoices--id-">
<a href="#admin-recurring-invoices-PUTapi-v1-recurring-invoices--id-">Update a recurring invoice</a>
</li>
</ul>
</ul>
<ul id="tocify-header-22" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-roles-abilities">
<a href="#admin-roles-abilities">Admin / Roles & Abilities</a>
</li>
<ul id="tocify-subheader-admin-roles-abilities" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-roles-abilities-GETapi-v1-abilities">
<a href="#admin-roles-abilities-GETapi-v1-abilities">List all abilities</a>
</li>
<li class="tocify-item level-2" data-unique="admin-roles-abilities-GETapi-v1-roles">
<a href="#admin-roles-abilities-GETapi-v1-roles">List all roles</a>
</li>
<li class="tocify-item level-2" data-unique="admin-roles-abilities-POSTapi-v1-roles">
<a href="#admin-roles-abilities-POSTapi-v1-roles">Create a role</a>
</li>
<li class="tocify-item level-2" data-unique="admin-roles-abilities-GETapi-v1-roles--id-">
<a href="#admin-roles-abilities-GETapi-v1-roles--id-">Retrieve a role</a>
</li>
<li class="tocify-item level-2" data-unique="admin-roles-abilities-PUTapi-v1-roles--id-">
<a href="#admin-roles-abilities-PUTapi-v1-roles--id-">Update a role</a>
</li>
<li class="tocify-item level-2" data-unique="admin-roles-abilities-DELETEapi-v1-roles--id-">
<a href="#admin-roles-abilities-DELETEapi-v1-roles--id-">Delete a role</a>
</li>
</ul>
</ul>
<ul id="tocify-header-23" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-settings">
<a href="#admin-settings">Admin / Settings</a>
</li>
<ul id="tocify-subheader-admin-settings" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-settings-GETapi-v1-settings">
<a href="#admin-settings-GETapi-v1-settings">Get app settings</a>
</li>
<li class="tocify-item level-2" data-unique="admin-settings-POSTapi-v1-settings">
<a href="#admin-settings-POSTapi-v1-settings">Update app settings</a>
</li>
</ul>
</ul>
<ul id="tocify-header-24" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-tax-types">
<a href="#admin-tax-types">Admin / Tax Types</a>
</li>
<ul id="tocify-subheader-admin-tax-types" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-tax-types-GETapi-v1-tax-types">
<a href="#admin-tax-types-GETapi-v1-tax-types">List all tax types</a>
</li>
<li class="tocify-item level-2" data-unique="admin-tax-types-POSTapi-v1-tax-types">
<a href="#admin-tax-types-POSTapi-v1-tax-types">Create a tax type</a>
</li>
<li class="tocify-item level-2" data-unique="admin-tax-types-GETapi-v1-tax-types--id-">
<a href="#admin-tax-types-GETapi-v1-tax-types--id-">Retrieve a tax type</a>
</li>
<li class="tocify-item level-2" data-unique="admin-tax-types-PUTapi-v1-tax-types--id-">
<a href="#admin-tax-types-PUTapi-v1-tax-types--id-">Update a tax type</a>
</li>
<li class="tocify-item level-2" data-unique="admin-tax-types-DELETEapi-v1-tax-types--id-">
<a href="#admin-tax-types-DELETEapi-v1-tax-types--id-">Delete a tax type</a>
</li>
</ul>
</ul>
<ul id="tocify-header-25" class="tocify-header">
<li class="tocify-item level-1" data-unique="admin-users">
<a href="#admin-users">Admin / Users</a>
</li>
<ul id="tocify-subheader-admin-users" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="admin-users-POSTapi-v1-users-delete">
<a href="#admin-users-POSTapi-v1-users-delete">Delete users</a>
</li>
<li class="tocify-item level-2" data-unique="admin-users-GETapi-v1-users">
<a href="#admin-users-GETapi-v1-users">List all users</a>
</li>
<li class="tocify-item level-2" data-unique="admin-users-POSTapi-v1-users">
<a href="#admin-users-POSTapi-v1-users">Create a user</a>
</li>
<li class="tocify-item level-2" data-unique="admin-users-GETapi-v1-users--id-">
<a href="#admin-users-GETapi-v1-users--id-">Retrieve a user</a>
</li>
<li class="tocify-item level-2" data-unique="admin-users-PUTapi-v1-users--id-">
<a href="#admin-users-PUTapi-v1-users--id-">Update a user</a>
</li>
</ul>
</ul>
<ul id="tocify-header-26" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-authentication">
<a href="#customer-authentication">Customer / Authentication</a>
</li>
<ul id="tocify-subheader-customer-authentication" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-authentication-POSTapi-v1--company_slug--customer-auth-login">
<a href="#customer-authentication-POSTapi-v1--company_slug--customer-auth-login">Customer Login</a>
</li>
<li class="tocify-item level-2" data-unique="customer-authentication-POSTapi-v1--company_slug--customer-auth-logout">
<a href="#customer-authentication-POSTapi-v1--company_slug--customer-auth-logout">Customer Logout</a>
</li>
</ul>
</ul>
<ul id="tocify-header-27" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-estimates">
<a href="#customer-estimates">Customer / Estimates</a>
</li>
<ul id="tocify-subheader-customer-estimates" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-estimates-POSTapi-v1--company_slug--customer-estimate--estimate--status">
<a href="#customer-estimates-POSTapi-v1--company_slug--customer-estimate--estimate--status">Accept an estimate.</a>
</li>
<li class="tocify-item level-2" data-unique="customer-estimates-GETapi-v1--company_slug--customer-estimates">
<a href="#customer-estimates-GETapi-v1--company_slug--customer-estimates">List all estimates for customer</a>
</li>
<li class="tocify-item level-2" data-unique="customer-estimates-GETapi-v1--company_slug--customer-estimates--id-">
<a href="#customer-estimates-GETapi-v1--company_slug--customer-estimates--id-">Retrieve a customer estimate</a>
</li>
</ul>
</ul>
<ul id="tocify-header-28" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-expenses">
<a href="#customer-expenses">Customer / Expenses</a>
</li>
<ul id="tocify-subheader-customer-expenses" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-expenses-GETapi-v1--company_slug--customer-expenses">
<a href="#customer-expenses-GETapi-v1--company_slug--customer-expenses">List all expenses for customer</a>
</li>
<li class="tocify-item level-2" data-unique="customer-expenses-GETapi-v1--company_slug--customer-expenses--id-">
<a href="#customer-expenses-GETapi-v1--company_slug--customer-expenses--id-">Retrieve a customer expense</a>
</li>
</ul>
</ul>
<ul id="tocify-header-29" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-general">
<a href="#customer-general">Customer / General</a>
</li>
<ul id="tocify-subheader-customer-general" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-general-GETapi-v1--company_slug--customer-bootstrap">
<a href="#customer-general-GETapi-v1--company_slug--customer-bootstrap">Bootstrap</a>
</li>
</ul>
</ul>
<ul id="tocify-header-30" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-invoices">
<a href="#customer-invoices">Customer / Invoices</a>
</li>
<ul id="tocify-subheader-customer-invoices" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-invoices-GETapi-v1--company_slug--customer-invoices">
<a href="#customer-invoices-GETapi-v1--company_slug--customer-invoices">List all invoices for customer</a>
</li>
<li class="tocify-item level-2" data-unique="customer-invoices-GETapi-v1--company_slug--customer-invoices--id-">
<a href="#customer-invoices-GETapi-v1--company_slug--customer-invoices--id-">Retrieve a customer invoice</a>
</li>
</ul>
</ul>
<ul id="tocify-header-31" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-payments">
<a href="#customer-payments">Customer / Payments</a>
</li>
<ul id="tocify-subheader-customer-payments" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-payments-GETapi-v1--company_slug--customer-payments">
<a href="#customer-payments-GETapi-v1--company_slug--customer-payments">List all payments for customer</a>
</li>
<li class="tocify-item level-2" data-unique="customer-payments-GETapi-v1--company_slug--customer-payments--id-">
<a href="#customer-payments-GETapi-v1--company_slug--customer-payments--id-">Retrieve a customer payment</a>
</li>
<li class="tocify-item level-2" data-unique="customer-payments-GETapi-v1--company_slug--customer-payment-method">
<a href="#customer-payments-GETapi-v1--company_slug--customer-payment-method">List all payment methods for the customer</a>
</li>
</ul>
</ul>
<ul id="tocify-header-32" class="tocify-header">
<li class="tocify-item level-1" data-unique="customer-profile">
<a href="#customer-profile">Customer / Profile</a>
</li>
<ul id="tocify-subheader-customer-profile" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="customer-profile-POSTapi-v1--company_slug--customer-profile">
<a href="#customer-profile-POSTapi-v1--company_slug--customer-profile">Update customer profile</a>
</li>
<li class="tocify-item level-2" data-unique="customer-profile-GETapi-v1--company_slug--customer-me">
<a href="#customer-profile-GETapi-v1--company_slug--customer-me">Get customer profile</a>
</li>
</ul>
</ul>
<ul id="tocify-header-33" class="tocify-header">
<li class="tocify-item level-1" data-unique="misc">
<a href="#misc">Misc</a>
</li>
<ul id="tocify-subheader-misc" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="misc-GETapi-v1-countries">
<a href="#misc-GETapi-v1-countries">Countries</a>
</li>
<li class="tocify-item level-2" data-unique="misc-GETapi-v1-app-version">
<a href="#misc-GETapi-v1-app-version">App Version</a>
</li>
</ul>
</ul>
</div>
<ul class="toc-footer" id="toc-footer">
<li>
<a href="collection.json">View Postman collection</a>
</li>
<li>
<a href="openapi.yaml">View OpenAPI spec</a>
</li>
</ul>
<ul class="toc-footer" id="last-updated">
<li>Last updated: Jan 27 2024</li>
</ul>
</div>
<div class="page-wrapper">
<div class="dark-box"></div>
<div class="content">
<h1 id="introduction">Introduction</h1>
<p>This documentation aims to provide all the information you need to work with our API.</p>
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).
</aside>
<blockquote>
<p>Base URL</p>
</blockquote>
<pre><code class="language-yaml">http://invoiceshelf.test</code></pre>
<h1 id="authenticating-requests">Authenticating requests</h1>
<p>This API is authenticated by sending an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer {YOUR_AUTH_TOKEN}"</code></strong>.</p>
<p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p>
<p>You can retrieve your token by doing a POST Request on api/v1/auth/login endpoint. Also because Crater supports multiple companies, you must pass the header "company" with value as the ID of the company you are requesting.</p>
<h1 id="admin-authentication">Admin / Authentication</h1>
<p>API Endpoints for Admin Authentication / Token Management</p>
<h2 id="admin-authentication-POSTapi-v1-auth-login">Login</h2>
<p></p>
<p>Crater uses API Tokens for authentication.
The endpoint will return the plain-text API token which may then be stored and used to make additional API requests.</p>
<p>Internally, Crater uses Laravel Sanctum package for handling authentication.
You can check this URL to know more: <a href="https://laravel.com/docs/8.x/sanctum#how-it-works-api-tokens">https://laravel.com/docs/8.x/sanctum#how-it-works-api-tokens</a></p>
<span id="example-requests-POSTapi-v1-auth-login">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request POST \
"http://invoiceshelf.test/api/v1/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "company: 1" \
--data "{
\"username\": \"[email protected]\",
\"password\": \"password\",
\"device_name\": \"mobile_app\"
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://invoiceshelf.test/api/v1/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"company": "1",
};
let body = {
"username": "[email protected]",
"password": "password",
"device_name": "mobile_app"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());</code></pre></div>
<div class="php-example">
<pre><code class="language-php">$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://invoiceshelf.test/api/v1/auth/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'company' => '1',
],
'json' => [
'username' => '[email protected]',
'password' => 'password',
'device_name' => 'mobile_app',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));</code></pre></div>
</span>
<span id="example-responses-POSTapi-v1-auth-login">
</span>
<span id="execution-results-POSTapi-v1-auth-login" hidden>
<blockquote>Received response<span id="execution-response-status-POSTapi-v1-auth-login"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-POSTapi-v1-auth-login"></code></pre>
</span>
<span id="execution-error-POSTapi-v1-auth-login" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-POSTapi-v1-auth-login"></code></pre>
</span>
<form id="form-POSTapi-v1-auth-login" data-method="POST" data-path="api/v1/auth/login" data-authed="0" data-hasfiles="0" data-isarraybody="0" data-headers='{"Content-Type":"application\/json","Accept":"application\/json","company":"1"}' autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTapi-v1-auth-login', this);">
<h3>
Request </h3>
<p>
<small class="badge badge-black">POST</small>
<b><code>api/v1/auth/login</code></b>
</p>
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
<p>
<b><code>username</code></b> <small>string</small> <input type="text" name="username" data-endpoint="POSTapi-v1-auth-login" value="[email protected]" data-component="body" hidden>
<br>
<p>Email ID of the user.</p>
</p>
<p>
<b><code>password</code></b> <small>string</small> <input type="text" name="password" data-endpoint="POSTapi-v1-auth-login" value="password" data-component="body" hidden>
<br>
<p>Password of the user.</p>
</p>
<p>
<b><code>device_name</code></b> <small>string</small> <input type="text" name="device_name" data-endpoint="POSTapi-v1-auth-login" value="mobile_app" data-component="body" hidden>
<br>
<p>Any Device name identifier.</p>
</p>
</form>
<h2 id="admin-authentication-POSTapi-v1-auth-logout">Logout</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>This will invalidate the API Token so it cannot be used anymore.</p>
<span id="example-requests-POSTapi-v1-auth-logout">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request POST \
"http://invoiceshelf.test/api/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "company: 1"</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://invoiceshelf.test/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
"company": "1",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());</code></pre></div>
<div class="php-example">
<pre><code class="language-php">$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://invoiceshelf.test/api/v1/auth/logout',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'company' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));</code></pre></div>
</span>
<span id="example-responses-POSTapi-v1-auth-logout">
</span>
<span id="execution-results-POSTapi-v1-auth-logout" hidden>
<blockquote>Received response<span id="execution-response-status-POSTapi-v1-auth-logout"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-POSTapi-v1-auth-logout"></code></pre>
</span>
<span id="execution-error-POSTapi-v1-auth-logout" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-POSTapi-v1-auth-logout"></code></pre>
</span>
<form id="form-POSTapi-v1-auth-logout" data-method="POST" data-path="api/v1/auth/logout" data-authed="1" data-hasfiles="0" data-isarraybody="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_TOKEN}","Content-Type":"application\/json","Accept":"application\/json","company":"1"}' autocomplete="off" onsubmit="event.preventDefault(); executeTryOut('POSTapi-v1-auth-logout', this);">
<h3>
Request </h3>
<p>
<small class="badge badge-black">POST</small>
<b><code>api/v1/auth/logout</code></b>
</p>
<p>
<label id="auth-POSTapi-v1-auth-logout" hidden>Authorization header:
<b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="POSTapi-v1-auth-logout" data-component="header"></label>
</p>
</form>
<h2 id="admin-authentication-GETapi-v1-auth-check">Token Validity Check</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>