· 6 years ago · Dec 10, 2018, 01:12 PM
1FORMAT: 1A
2HOST: https://www1.sparklnow.com.farshore.net/api/v1/
3
4# Sparkl API
5
6These are the endpoints for Sparkl application.
7
8## Login [/login]
9
10### Login User[POST]
11
12Data sent as plain POST request.
13
14+ Request
15
16 {
17 "email": "balabro@farshore.com",
18 "password": "Test1243"
19 }
20
21+ Response 200 (application/json)
22
23 {
24 "status":1,
25 "user_id":106,
26 "email":"balabro@farshore.com",
27 "access_token":"e850fb7d0d520c18b0b018221"
28 }
29
30+ Response 401 (application/json)
31
32 {
33 "error": "Login failed. / Incorrect username or password"
34 }
35
36
37## Register [/register]
38
39### User registration [POST]
40
41Data sent as plain POST request.
42
43+ Request
44
45 {
46 "first_name": "Bala",
47 "last_name": "Kanna"
48 "email": "balabro@farshore.com",
49 "password": "Test1243",
50 "role": "Customer/Tehnician/Admin/Coordinator",
51 "phone": "093214122"
52 }
53
54+ Response 200 (application/json)
55
56 {
57 "success": true,
58 "access_token":"e850fb7d0d520c18b0b018221"
59 }
60
61+ Response 401 (application/json)
62
63 {
64 "errors": {
65 "email": "That email is already in use.",
66 "password": "Passwords do not match!"
67 }
68 }
69
70## User [/user?token=e850fb7d0d520c18b0b018221]
71
72### Get User [GET]
73
74+ Request (application/json)
75
76+ Response 200 (application/json)
77
78 {
79 "data": {
80 "id": 26,
81 "first_name": "Luka",
82 "last_name": "Gado",
83 "email": "luka.gado@farshore.com",
84 "phone": "09842341232"
85 }
86 }
87
88
89### Edit User [PUT]
90
91+ Request (application/json)
92
93 {
94 "first_name": "Luka",
95 "last_name": "Gado",
96 "email": "luka.gado@farshore.com"
97 }
98
99+ Response 200 (application/json)
100
101## User - Forgot Password [/user/forgot-password]
102
103### Request new password [POST]
104
105+ Request (application/json)
106
107 {
108 "email": "lorem@lorem.com"
109 }
110
111+ Response 200 (application/json)
112
113## User - Change Password [/user/change-password]
114
115### Change Password [PUT]
116
117+ Request (application/json)
118
119 {
120 "current": "lorem",
121 "new": "ipsum"
122 }
123
124+ Response 200 (application/json)
125
126## Vehicles [/user/vehicles?token=e850fb7d0d520c18b0b018221]
127
128### Add Vehicle [POST]
129
130+ Request (application/json)
131
132 {
133 "data": {
134 "vehicle": {
135 "type": "Sedan",
136 "brand": "Renault",
137 "model": "Megane 2014",
138 "year": "2014",
139 "color": "red",
140 "license_plate": "NA123CE"
141 },
142 }
143 }
144
145+ Response 200 (application/json)
146
147### Get Vehicles [GET]
148
149+ Request (application/json)
150
151+ Response 200 (application/json)
152
153 {
154 "data": [
155 {
156 "vehicle": {
157 "id": 1,
158 "type": "Sedan",
159 "brand": "Renault",
160 "model": "Megane 2014",
161 "year": "2014",
162 "color": "red",
163 "license_plate": "NA123CE"
164 },
165 },
166 {
167 "vehicle": {
168 "id": 2,
169 "type": "Sedan",
170 "brand": "Renault",
171 "model": "Megane 2014",
172 "year": "2014",
173 "color": "red",
174 "license_plate": "NA123CE"
175 },
176 }
177 ]
178 }
179
180
181## Vehicle [/user/{userId}/vehicles/{id}]
182
183### Get Single Vehicle [GET]
184
185+ Parameters
186 + userId: `1` (required, int)
187 + id: `1` (required, int)
188
189+ Request (application/json)
190
191+ Response 200 (application/json)
192
193 {
194 "data": {
195 "vehicle": {
196 "id": 1,
197 "type": "Sedan",
198 "brand": "Renault",
199 "model": "Megane 2014",
200 "year": "2014",
201 "color": "red",
202 "license_plate": "NA123CE"
203 },
204 }
205 }
206
207### Edit Vehicle [PUT]
208
209+ Parameters
210 + userId: `1` (required, int)
211 + id: `1` (required, int)
212
213+ Request (application/json)
214
215 {
216 "type": "Sedan",
217 "brand": "Opel",
218 "model": "Kadett 2014",
219 "color": "Blue"
220 }
221
222+ Response 200 (application/json)
223
224 {
225 "data": {
226 "vehicle": {
227 "id": 1,
228 "type": "Sedan",
229 "brand": "Opel",
230 "model": "kadett 2014",
231 "year": "2014",
232 "color": "Blue",
233 "license_plate": "NA123CE"
234 },
235 }
236 }
237
238### Delete Vehicle [DELETE]
239
240+ Parameters
241 + userId: `1` (required, int)
242 + id: `1` (required, int)
243
244+ Request (application/json)
245
246+ Response 204 (application/json)
247
248
249
250## Time slots [/time-slots{?start_date}{?end_date}{?page}{?count}]
251
252### Get Available Time Slots [GET]
253
254+ Parameters
255 + start_date: `2018-09-17T05:07:28+00:00` (optional, string)
256 + end_date: `2018-09-18T05:07:28+00:00` (optional, string)
257 + page: `1` (optional, int)
258 + count: `1` (optional, int)
259
260+ Request (application/json)
261
262+ Response 200 (application/json)
263
264 {
265 "data": [
266 "2018-09-17": [
267 {
268 "start": "2018-09-17T06:00:00-07:00",
269 "end": "2018-09-17T16:00:00-07:00",
270 }
271 {
272 "start": "2018-09-17T18:00:00-07:00",
273 "end": "2018-09-17T21:00:00-07:00",
274 }
275 ],
276 "2018-09-18" : {
277 "start": "2018-09-18T06:00:00-07:00",
278 "end": "2018-09-18T021:00:00-07:00"
279 }
280 ]
281 }
282
283
284## Schedules [/schedule]
285
286### Add Schedule [POST]
287
288+ Request
289
290 {
291 "user_id": 12,
292 "firstname": "Luka",
293 "lastname": "Gado",
294 "description": "Inside only wash",
295 "address": "Yellowstone blvd 2",
296 "address_notes": "In front of the park",
297 "payment_method": "PayPal",
298 "zipcode": "96258",
299 "vehicle": {
300 "vehicle_type": "SUV",
301 "vehicle_brand": "Ford",
302 "vehicle_model": "Fiesta",
303 "vehicle_color": "Red",
304 "vehicle_license_plate": "NY1234BN",
305 },
306 "total": 25.00,
307 "scheduled_at": "2018-09-27T15:11:49+00:00"
308 }
309
310+ Response 200 (application/json)
311
312 {
313 "success": true
314 }
315
316+ Response 401 (application/json)
317
318 {
319 "errors": {
320 "scheduled_at": "Date is no longer available"
321 }
322 }
323
324### Get All Schedules [GET]
325
326+ Request (application/json)
327 + Headers
328
329 Authorization: Bearer {{oauthToken}}
330
331+ Response 200 (application/json)
332
333 {
334 "data": [
335 {
336 "id": 1,
337 "user_id": 23,
338 "vehicle_id": {
339 "type": "Sedan",
340 "brand": "Ford"
341 "model": "2018",
342 "color": "Red",
343 "license_plate": "NY1234BD"
344 },
345 "description": "Inside wash + polish",
346 "sparkl_team": {
347 "email": "tehnician1@sparklnow.com"
348 },
349 "address": "Yellowstone Blvd 2",
350 "address_notes": "Its behind the restaurant",
351 "zipcode": "96258",
352 "total": 99,99,
353 "scheduled_at": "2018-09-27T15:11:49+00:00"
354 },
355 {
356 "id": 2,
357 "user_id": 51,
358 "vehicle_id": {
359 "type": "SUV",
360 "brand": "Ford"
361 "model": "1954",
362 "color": "Black",
363 "license_plate": "ZG3412AD"
364 },
365 "sparkl_team": {
366 "email": "tehnician1@sparklnow.com"
367 },
368 "description": "Inside wash + polish",
369 "address": "Dieterle Crescent",
370 "address_notes": "No notes",
371 "zipcode": "96258"
372 "total": 99,99,
373 "scheduled_at": "2018-09-27T15:11:49+00:00"
374 },
375 {
376 "id": 3,
377 "user_id": 1,
378 "vehicle_id": {
379 "type": "Sedan",
380 "brand": "Mini"
381 "model": "2018",
382 "color": "Red/white",
383 "license_plate": "LA2314-2-D"
384 },
385 "sparkl_team": {
386 "email": "tehnician1@sparklnow.com"
387 },
388 "description": "Inside wash + polish",
389 "address": "Jackson Heights",
390 "address_notes": "Elementary school",
391 "total": 99,99,
392 "scheduled_at": "2018-09-27T15:11:49+00:00"
393 }
394 ]
395 }
396
397## Specific Schedules [/schedule{?start_date}{?end_date}{?page}{?count}]
398
399### Get Specific Schedules [GET]
400
401+ Parameters
402 + start_date: `2018-08-04T05:07:28+00:00` (optional, string)
403 + end_date: `2018-08-04T05:07:28+00:00` (optional, string)
404 + page: `1` (optional, int)
405 + count: `1` (optional, int)
406
407+ Request (application/json)
408 + Headers
409
410 Authorization: Bearer {{oauthToken}}
411
412+ Response 200 (application/json)
413
414 {
415 "data": [
416 {
417 "id": 1,
418 "user_id": 23,
419 "vehicle_id": {
420 "type": "Sedan",
421 "brand": "Ford"
422 "model": "2018",
423 "color": "Red",
424 "license_plate": "NY1234BD"
425 },
426 "sparkl_team": {
427 "email": "tehnician1@sparklnow.com"
428 },
429 "description": "Inside wash + polish",
430 "address": "Yellowstone Blvd 2",
431 "address_notes": "Its behind the restaurant",
432 "zipcode": "96258",
433 "total": 99,99,
434 "scheduled_at": "2018-09-27T15:11:49+00:00"
435 },
436 {
437 "id": 2,
438 "user_id": 51,
439 "vehicle_id": {
440 "type": "SUV",
441 "brand": "Ford"
442 "model": "1954",
443 "color": "Black",
444 "license_plate": "ZG3412AD"
445 },
446 "sparkl_team": {
447 "email": "tehnician1@sparklnow.com"
448 },
449 "description": "Inside wash + polish",
450 "address": "Dieterle Crescent",
451 "address_notes": "No notes",
452 "zipcode": "96258",
453 "total": 99,99,
454 "scheduled_at": "2018-09-27T15:11:49+00:00"
455 },
456 {
457 "id": 3,
458 "user_id": 1,
459 "vehicle_id": {
460 "type": "Sedan",
461 "brand": "Mini"
462 "model": "2018",
463 "color": "Red/white",
464 "license_plate": "LA2314-2-D"
465 },
466 "sparkl_team": {
467 "email": "tehnician1@sparklnow.com"
468 },
469 "description": "Inside wash",
470 "address": "Jackson Heights",
471 "address_notes": "Elementary school",
472 "zipcode": "96258",
473 "total": 99,99,
474 "scheduled_at": "2018-09-27T15:11:49+00:00"
475 }
476 ]
477 }
478
479
480## Finished Schedules [/schedule{?status}{?token}]
481
482### Get Finished Schedules [GET]
483
484+ Parameters
485 + status: `finished` (optional, string)
486 + token: `1` (optional, int)
487
488+ Request (application/json)
489 + Headers
490
491 Authorization: Bearer {{oauthToken}}
492
493+ Response 200 (application/json)
494
495 {
496 "data": [
497 {
498 "id": 1,
499 "user_id": 23,
500 "vehicle_id": {
501 "type": "Sedan",
502 "brand": "Ford"
503 "model": "2018",
504 "color": "Red",
505 "license_plate": "NY1234BD"
506 },
507 "sparkl_team": {
508 "email": "tehnician1@sparklnow.com"
509 },
510 "description": "Inside wash + polish",
511 "address": "Yellowstone Blvd 2",
512 "address_notes": "Its behind the restaurant",
513 "zipcode": "96258",
514 "total": 99,99,
515 "scheduled_at": "2018-09-27T15:11:49+00:00"
516 },
517 {
518 "id": 2,
519 "user_id": 51,
520 "vehicle_id": {
521 "type": "SUV",
522 "brand": "Ford"
523 "model": "1954",
524 "color": "Black",
525 "license_plate": "ZG3412AD"
526 },
527 "sparkl_team": {
528 "email": "tehnician1@sparklnow.com"
529 },
530 "description": "Inside wash + polish",
531 "address": "Dieterle Crescent",
532 "address_notes": "No notes",
533 "zipcode": "96258",
534 "total": 99,99,
535 "scheduled_at": "2018-09-27T15:11:49+00:00"
536 },
537 {
538 "id": 3,
539 "user_id": 1,
540 "vehicle_id": {
541 "type": "Sedan",
542 "brand": "Mini"
543 "model": "2018",
544 "color": "Red/white",
545 "license_plate": "LA2314-2-D"
546 },
547 "sparkl_team": {
548 "email": "tehnician1@sparklnow.com"
549 },
550 "description": "Inside wash",
551 "address": "Jackson Heights",
552 "address_notes": "Elementary school",
553 "zipcode": "96258",
554 "total": 99,99,
555 "scheduled_at": "2018-09-27T15:11:49+00:00"
556 }
557 ]
558 }
559
560
561## Invoices [/user?token=e850fb7d0d520c18b0b018221/invoices{?start_date}{?end_date}{?page}{?count}]
562
563### Get Invoices for User [GET]
564
565+ Parameters
566 + start_date: `2018-08-04T05:07:28+00:00` (optional, string)
567 + end_date: `2018-08-04T05:07:28+00:00` (optional, string)
568 + page: `1` (optional, int)
569 + count: `1` (optional, int)
570
571+ Request (application/json)
572 + Headers
573
574 Authorization: Bearer {{oauthToken}}
575
576+ Response 200 (application/json)
577
578 {
579 "data": [
580 {
581 "id": 3,
582 "description": "Inside wash + polish",
583 "total": 75.34,
584 "vehicle": {
585 "type": "SUV",
586 "brand": "Ford",
587 "model": "2018",
588 "color": "red",
589 "license_plate": "ZG5555NA"
590 },
591 },
592 {
593 "id": 2,
594 "description": "Inside wash",
595 "total": 12.34,
596 "vehicle": {
597 "type": "Sedan",
598 "brand": "Renault",
599 "model": "Megane 2014",
600 "color": "red",
601 "license_plate": "NA123CE"
602 }
603 },
604 {
605 "id": 1,
606 "description": "Inside wash + polish",
607 "total": 75.34,
608 "vehicle": {
609 "type": "SUV",
610 "brand": "Ford",
611 "model": "2018",
612 "color": "red",
613 "license_plate": "ZG5555NA"
614 }
615 }
616 ],
617 "meta": {
618 "total": "3"
619 }
620 }
621
622## Tehnician Schedule [/tehnician/{?tehnicianId}/schedule{?start_date}{?end_date}{?page}{?count}]
623
624### Get Scheduled tehnician appointments [GET]
625
626+ Parameters
627 + tehnicianId: `1` (optional, int)
628 + start_date: `2018-08-04T05:07:28+00:00` (optional, string)
629 + end_date: `2018-08-04T05:07:28+00:00` (optional, string)
630 + page: `1` (optional, int)
631 + count: `1` (optional, int)
632
633+ Request (application/json)
634
635+ Response 200 (application/json)
636
637 {
638 "data": [
639 {
640 "id": 1,
641 "user_id": 23,
642 "vehicle_id": {
643 "type": "Sedan",
644 "brand": "Ford"
645 "model": "2018",
646 "color": "Red",
647 "license_plate": "NY1234BD"
648 },
649 "sparkl_team": {
650 "email": "tehnician1@sparklnow.com"
651 },
652 "description": "Inside wash + polish",
653 "address": "Yellowstone Blvd 2",
654 "address_notes": "Its behind the restaurant",
655 "zipcode": "96258",
656 "total": 99,99,
657 "scheduled_at": "2018-09-27T15:11:49+00:00"
658 },
659 {
660 "id": 2,
661 "user_id": 51,
662 "vehicle_id": {
663 "type": "SUV",
664 "brand": "Ford"
665 "model": "1954",
666 "color": "Black",
667 "license_plate": "ZG3412AD"
668 },
669 "sparkl_team": {
670 "email": "tehnician1@sparklnow.com"
671 },
672 "description": "Inside wash + polish",
673 "address": "Dieterle Crescent",
674 "address_notes": "No notes",
675 "zipcode": "96258",
676 "total": 99,99,
677 "scheduled_at": "2018-09-27T15:11:49+00:00"
678 },
679 {
680 "id": 3,
681 "user_id": 1,
682 "vehicle_id": {
683 "type": "Sedan",
684 "brand": "Mini"
685 "model": "2018",
686 "color": "Red/white",
687 "license_plate": "LA2314-2-D"
688 },
689 "sparkl_team": {
690 "email": "tehnician1@sparklnow.com"
691 },
692 "description": "Inside wash",
693 "address": "Jackson Heights",
694 "address_notes": "Elementary school",
695 "zipcode": "96258",
696 "total": 99,99,
697 "scheduled_at": "2018-09-27T15:11:49+00:00"
698 }
699 ]
700 }
701
702
703## Payment Methods [/payment-methods]
704
705### Get Payment Methods [GET]
706
707+ Request (application/json)
708
709+ Response 200 (application/json)
710
711 {
712 "data": [
713 {
714 "id": 1,
715 "name": "Paypal",
716 "code": "paypal",
717 "created_at": "2018-09-01T10:10:10+00:00",
718 "updated_at": "2018-09-01T10:10:10+00:00",
719 "enabled": true
720 },
721 {
722 "id": 2,
723 "name": "WorldPay",
724 "code": "worldpay",
725 "created_at": "2018-09-02T10:10:10+00:00",
726 "updated_at": "2018-09-02T10:10:10+00:00",
727 "enabled": true
728 }
729 ],
730 "meta": {
731 "total": "2"
732 }
733 }
734
735## Credit Cards [/user/credit-cards?token=e850fb7d0d520c18b0b018221]
736
737### Get Credit Cards [GET]
738
739+ Request (application/json)
740
741+ Response 200 (application/json)
742
743 {
744 "data": [
745 {
746 "credit_card": {
747 "id": 27,
748 "holder_name": "Luka Gado",
749 "mask": "****",
750 "type": {
751 "id": 2,
752 "name": "MasterCard",
753 "code": "mastercard",
754 "created_at": "2018-09-04T10:00:02+00:00",
755 "updated_at": "2018-09-04T10:00:02+00:00",
756 "position": 2
757 },
758 "expiry_month": 2,
759 "expiry_year": 2019
760 },
761 "default": false
762 },
763 {
764 "credit_card": {
765 "id": 28,
766 "holder_name": "Luka Gado",
767 "mask": "xxxx xxxx xxxx 1234",
768 "type": {
769 "id": 2,
770 "name": "MasterCard",
771 "code": "mastercard",
772 "created_at": "2018-09-04T10:00:02+00:00",
773 "updated_at": "2018-09-04T10:00:02+00:00",
774 "position": 2
775 },
776 "expiry_month": 2,
777 "expiry_year": 2019
778 },
779 "default": false
780 }
781 ],
782 "meta": {
783 "total": 2
784 }
785 }
786
787### Add Credit Card [POST]
788
789+ Request (application/json)
790
791 {
792 "holder_name": "Luka Gado",
793 "number": "1234 1234 1234 1234",
794 "cvv": 123,
795 "type": {"id": 2},
796 "expiry_month": 5,
797 "expiry_year": 2019
798 }
799
800+ Response 200 (application/json)
801
802 {
803 "data": {
804 "success": "true"
805 }
806 }
807
808+ Response 200 (application/json)
809
810 {
811 "data": {
812 "holder_name": "Luka Gado",
813 "mask": "xxxx xxxx xxxx 1111",
814 "type": {
815 "id": 3,
816 "name": "Visa",
817 "code": "visa",
818 "created_at": "2018-09-04T10:00:03+00:00",
819 "updated_at": "2018-09-04T10:00:03+00:00",
820 "position": 3
821 },
822 "expiry_month": 5,
823 "expiry_year": 2019,
824 }
825 }
826
827## Credit Card [/user/credit-cards?token=e850fb7d0d520c18b0b018221/{id}]
828
829### Delete Credit Card [DELETE]
830
831+ Parameters
832 + id: `1` (required, int)
833
834+ Request (application/json)
835
836+ Response 200 (application/json)
837
838## Credit Card Types [/credit-card-types]
839
840### Get Credit Card Types [GET]
841
842+ Request (application/json)
843
844+ Response 200 (application/json)
845
846 {
847 "data": [
848 {
849 "id": 1,
850 "name": "American Express",
851 "code": "amex",
852 "created_at": "2018-09-04T10:00:01+00:00",
853 "updated_at": "2018-09-04T10:00:01+00:00"
854 },
855 {
856 "id": 2,
857 "name": "MasterCard",
858 "code": "mastercard",
859 "created_at": "2018-09-04T10:00:02+00:00",
860 "updated_at": "2018-09-04T10:00:02+00:00"
861 },
862 {
863 "id": 3,
864 "name": "Visa",
865 "code": "visa",
866 "created_at": "2018-09-04T10:00:03+00:00",
867 "updated_at": "2018-09-04T10:00:03+00:00"
868 },
869 {
870 "id": 4,
871 "name": "Visa Electron",
872 "code": "visa-electron",
873 "created_at": "2018-09-04T10:00:04+00:00",
874 "updated_at": "2018-09-04T10:00:04+00:00"
875 },
876 {
877 "id": 5,
878 "name": "Maestro",
879 "code": "maestro",
880 "created_at": "2018-09-04T10:00:05+00:00",
881 "updated_at": "2018-09-04T10:00:05+00:00"
882 }
883 ],
884 "meta": {
885 "total": "5"
886 }
887 }
888
889## Tehnician Order done [/tehnician/orders/{orderId}]
890
891### Tehnician order done [PUT]
892
893+ Parameters
894 + orderId: `1` (required, int)
895
896+ Request (application/json)
897
898 {
899 "order_id": 1
900 "status": "Finished"
901 }
902
903+ Response 200 (application/json)
904
905## Specific ZipCode
906
907### Get Specific ZipCode [/orders/zipcode{?zipCodeId}]
908
909
910+ Parameters
911 + zipCodeId: `32423` (optional, string)
912
913+ Request (application/json)
914 + Headers
915
916 Authorization: Bearer {{oauthToken}}
917
918+ Response 200 (application/json)
919
920 {
921 "data": [
922 {
923 "id": 1,
924 "zipcode": "32423",
925 "city_alias": "Chicago"
926 }
927 ]
928 }
929
930+ Response 204 (application/json)
931
932
933## ZipCodes [/orders/zipcodes]
934
935### Get ZipCodes [GET]
936
937+ Request (application/json)
938
939+ Response 200 (application/json)
940
941 {
942 "data": [
943 {
944 "id": 1,
945 "zipcode": "32423",
946 "city_alias": "Chicago"
947 },
948 {
949 "id": 2,
950 "name": "532325",
951 "code": "Chicago lake",
952 }
953 ],
954 "meta": {
955 "total": "2"
956 }
957 }
958
959### Add Potential ZipCodes [POST]
960
961+ Request (application/json)
962
963 {
964 "email": "testuser@gmail.com",
965 "zipcode": "12367",
966 }
967
968+ Response 200 (application/json)
969
970 {
971 "data": {
972 "success": "true"
973 }
974 }
975
976
977
978## Service List [/services]
979
980### Get Services [GET]
981
982+ Request (application/json)
983
984+ Response 200 (application/json)
985
986 {
987 "data": [
988 {
989 "car_type": "SUV",
990 "price": "321.32",
991 "description": "Inside out wash",
992 "image": "/outside.png",
993 "extra_services": [
994 {
995 "description": "Pet Hair Removal",
996 "price": "25.00",
997 "duration": 2.00
998 },
999 {
1000 "description": "Floor Shampoo",
1001 "price": "25.00",
1002 "duration": 2.00
1003 }
1004 ],
1005 "duration": 2.30
1006 },
1007 {
1008 "car_type": "SEDAN",
1009 "price": "321.32",
1010 "description": "Inside out wash",
1011 "image": "/outside.png",
1012 "extra_services": [
1013 {
1014 "description": "Pet Hair Removal",
1015 "price": "25.00",
1016 "duration": "2.00"
1017 },
1018 {
1019 "description": "Pet Hair Removal",
1020 "price": "25.00",
1021 "duration": "2.00"
1022 }
1023 ],
1024 "duration": 2,30
1025 },
1026 ]
1027 }
1028
1029
1030## Vehicle Information Year [/vehicle-information/year]
1031
1032### Get Vehicle Year Information [GET]
1033
1034+ Request (application/json)
1035
1036+ Response 200 (application/json)
1037
1038 {
1039 "data": [
1040 {
1041 "model_id": 2,
1042 "model_year": "1932"
1043 },
1044 {
1045 "model_id": 3,
1046 "model_year": "1933"
1047 },
1048 {
1049 "model_id": 3,
1050 "model_year": "1934"
1051 }
1052 ]
1053 }
1054
1055
1056
1057## Vehicle Information [/vehicle-information/make/{yearId}]
1058
1059### Get Vehicle Make Information [GET]
1060
1061+ Parameters
1062 + yearId: `1945` (optional, string)
1063
1064+ Request (application/json)
1065
1066+ Response 200 (application/json)
1067
1068 {
1069 "data": [
1070 {
1071 "model_id": 2,
1072 "model_make_id": "abarth"
1073 },
1074 {
1075 "model_id": 3,
1076 "model_make_id": "Austin"
1077 },
1078 {
1079 "model_id": 3,
1080 "model_make_id": "Alfa romeo"
1081 }
1082 ]
1083 }
1084
1085
1086## Vehicle Model Information [/vehicle-information/model/{carMake}]
1087
1088### Get Vehicle Model Information [GET]
1089
1090+ Parameters
1091 + carMake: `Austin` (optional, string)
1092
1093+ Request (application/json)
1094
1095+ Response 200 (application/json)
1096
1097 {
1098 "data": [
1099 {
1100 "model_id": 2,
1101 "model_make_id": "Punto"
1102 },
1103 {
1104 "model_id": 3,
1105 "model_make_id": "Panda"
1106 },
1107 {
1108 "model_id": 3,
1109 "model_make_id": "500L"
1110 }
1111 ]
1112 }