This repository has been archived by the owner on Oct 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapiary.apib
2745 lines (1910 loc) · 145 KB
/
apiary.apib
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
FORMAT: 1A
HOST: https://api.mylimobiz.com/v0
# Customer API
<script async="" src="//www.google-analytics.com/analytics.js"></script>
<link rel="stylesheet" type="text/css" src="http://example.com/my.css"/>
## Overview
The Customer API allows custom applications to interact programmatically with Limo Anywhere. Using the Customer API you interact with resources allowing for actions such as:
- Customer Sign Up.
- Rate Lookup & Calculation.
- Reservation Creation/Modification/Cancellation.
The API accepts/returns JSON data and attempts to conform to the <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">RESTful</a> design principles. You can interact with the resources exposed via the API by accessing resource collections and element URIs by using the HTTP verbs (GET, POST, PUT, and DELETE).
## General Requirements
To use the Limo Anywhere Customer API in your application, you must have an API authentication token from the token service. See the <a href="#reference/authentication">Authentication documentation</a> for the authorization guide.
<b>Before you can generate an access token, you must agree to the API Terms of Service and receive a Client ID and Client Secret from Limo Anywhere.</b>
If you have not done this and would like to use the API, please email [[email protected]](mailto:[email protected])
## HTTP Status Codes
| Status Code | Label | Returned After|
|--------------------------|---------------------------|--------------------------------------------------------------------------------|
|200 | OK.| Operation worked as expected. |
|201 | Created. | Successful POST where a resource was created. |
|202 | Accepted. |Successful operation. |
|204 | No Content. | GET request where content doesn't exist. |
|400 | Bad request. | |
|401 | Unauthorized. | Request when API client credentials or customer credentials have not been validated. |
|403 | Forbidden. | Unauthorized requests such as improper OAuth 2.0 scopes or permissions issues. |
|404 | Not Found. | Requested resource was not found. |
|409 | Conflict. | A conflict exists and needs to be resolved before the request can be made. |
|429 | Too Many Requests. | Rate limit has been reached. |
|500 | Internal Server Error. | |
## Getting Started
Follow the below steps to complete some of the most popular actions.
<b> Get Authorization to use the Customer API before doing anything else.</b>
1. Contact [[email protected]](mailto:[email protected]) and receive your Client Id & Client Secret.
2. Use Client Id & Client Secret to generate an access token as described <a href="/#reference/authentication">here.</a>
Once you have completed the above, choose a sub-section to follow:
<b> Create a Booking</b>
1. Call the <a href="/#reference/booking/rate-lookup/rate-lookup">Rate Lookup</a> method to get the pricing for your trip requirements. Choose the optimal pricing and hold the `Id` of this rate from the `results` array.
2. Use the <a href="/#reference/booking/booking/booking">Booking</a> method. In `search_result_id` parameter set the rate Id of the desired rate and provide additional necessary information: payment, passengers, optional rates etc.
<b> Create a Quote</b>
1. Call the <a href="/#reference/booking/rate-lookup/rate-lookup">Rate Lookup</a> method to get the pricing for your trip requirements. Choose the optimal pricing and hold the `Id` of this rate from the `results` array.
2. Use the <a href="/#reference/booking/rate-lookup/create-quote">Create Quote</a> method. In the `search_result_id` parameter, use the search result Id from the <a href="#reference/booking/rate-lookup/rate-lookup">Rate Lookup</a> method and provide additional necessary information (same as the <a href="#reference/booking/booking/booking">Booking</a> process)
## Group Authentication
The API uses the <a href="https://tools.ietf.org/html/rfc6749"> OAuth 2.0 </a> protocol for simple, but effective authentication and authorization.
All API endpoints require an OAuth access token, thus we have exposed a service that will provide the user with an OAuth 2 Access token.
This token should be provided in the header in all requests.
## GET Access Token [/get]
We support 2 ways of obtaining authorization:
- <b>Client Credentials Grant: </b> Requires only the `client_secret` and does not allow access to anything listed in [Customer Resources](#customer_resources)
- <b>Resource Owner Credentials Grant: </b> Additionally requires `password` and `username` of a passenger account. Allows access to all resources
### Basic Steps for getting an 'access_token':
1. Choose one of the suitable methods of obtaining Authorization described above (Client or Resource Owner.)
2. Create the appropriate request. Parameter `grant_type` will depend on Authorization method:
### Client Credentials Grant [POST /oauth2/token]
`grant_type` = `client_credentials`
+ Request Client Credentials Grant
+ `grant_type` (string) Required. String length: inclusive between 0 and 50.f
+ `client_id` (string) Required. String length: inclusive between 6 and 50.
+ `client_secret` (string) Required. String length: inclusive between 50 and 50.
+ Headers
Content-Type: application/json
+ Body
{
"grant_type": "client_credentials",
"client_id": "la_customer_test",
"client_secret": "lcfLYzj7RaUgmRp8sVngt2fpD5GaBJ19Ptt2MrNSlF57GI5kAR"
}
+ Response 200 (application/json)
+ Body
{
"access_token": "YE0W7CSdfVaQFmC8GTQ1",
"token_type": "bearer",
"expires_in": 3600
}
### Resource Owner Credentials Grant [POST /oauth2/token]
`grant_type` = `password`
+ Request
+ `grant_type` (string) Required. String length: inclusive between 0 and 50.
+ `client_id` (string) Required. String length: inclusive between 6 and 50.
+ `client_secret` (string) Required. String length: inclusive between 50 and 50.
+ `company_id` (string) String length: inclusive between 0 and 50.
+ `username` (string) String length: inclusive between 0 and 50.
+ `password` (string) String length: inclusive between 0 and 50.
+ Headers
Content-Type: application/json
+ Body
{
"grant_type": "password",
"client_id": "la_customer_test",
"client_secret": "lcfLYzj7RaUgmRp8sVngt2fpD5GaBJ19Ptt2MrNSlF57GI5kAR",
"company_id": "test_alias",
"username": "[email protected]",
"password": "password"
}
+ Response 200 (application/json)
+ Body
{
"access_token": "YE0W7CSdfVaQFmC8GTQ1",
"refresh_token": "yuMF7U7FHMCL2cuI5qKV",
"token_type": "bearer",
"expires_in": 3600
}
## Refresh Access Token [/refresh]
Your access token will expire after a period of time and must be refreshed. Time until token expiration is provided in the `expired_in` parameter when receiving your token. <b>If you receive a 401 error, you may need to refresh your token.</b>
### Refresh [POST /oauth2/token]
+ Request
+ `grant_type` (string) Required. String length: inclusive between 0 and 50.
+ `refresh_token` (string) Required. String length: 20.
+ `client_id` (string) Required. String length: inclusive between 6 and 50.
+ `client_secret` (string) Required. String length: inclusive between 50 and 50.
+ Headers
Content-Type: application/json
+ Body
{
"grant_type": "refresh_token",
"refresh_token": "CSYE0W7dfVaQFmC8GTQPL",
"client_id": "la_customer_test",
"client_secret": "lcfLYzj7RaUgmRp8sVngt2fpD5GaBJ19Ptt2MrNSlF57GI5kAR"
}
+ Response 200 (application/json)
+ Body
{
"access_token": "YE0W7CSdfVaQFmC8GTQ1",
"token_type": "bearer",
"expires_in": 3600
}
The tables below describe all possible request/response parameters:
#####Request:
| Parameter | Description |
|------------------|-------------------------------------------------------------------------------------------------------------------------|
| grant_type | Type of Grant described above. Possible values: `client_credentials`, `authorization_code`, `password`, `refresh_token` |
| client_id | The client ID of your application |
| client_secret | The client Secret of your application |
| company_alias | The Alias of you company |
| username | Username or Email |
| passwod | Password |
#####Response:
| Parameter | Description |
|------------------|------------------------------------------------------------|
| access_token | Access Token |
| token_type | Token type (Always `bearer`) |
| expires_in | Expiration time of Access token (in seconds) |
| refresh_token | Refresh Token |
### Possible Authentication Errors
| Parameter | Description |
|-------------------------------|---------------------------------------------------------------|
| invalid_request | Required parameters were not provided |
| invalid_client | The Сlient ID or Clernt secret provided is invalid |
| invalid_scope (not used now) | The scope parameter provided is not a valid subset of scopes |
| unsupported_grant_type | Unsupported Grand Type provided |
In 'execution' console you can see request/response samples, data types and sizes of parameters
## Group General Resources
The resources in this section can be used to assist with populating form elements or using auto-complete functionality.
## Airlines [/airlines]
### Get Collection [GET /resources/airlines?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of Airlines.
+ Parameters
+ search_for: DFW (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "iata": "sample string 1", "name": "sample string 2" }, { "iata": "sample string 1", "name": "sample string 2" } ] }
## Airports [/airports]
### Get Collection [GET /resources/airports?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of Airports.
+ Parameters
+ search_for: (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "iata": "sample string 1", "name": "sample string 2", "address": { "name": "sample string 1", "phone": "sample string 2", "country_code": "sample string 3", "state_code": "sample string 4", "postal_code": "sample string 5", "county": "sample string 6", "city": "sample string 7", "address_line1": "sample string 8", "address_line2": "sample string 9", "latitude": 10.1, "longitude": 11.1 } }, { "iata": "sample string 1", "name": "sample string 2", "address": { "name": "sample string 1", "phone": "sample string 2", "country_code": "sample string 3", "state_code": "sample string 4", "postal_code": "sample string 5", "county": "sample string 6", "city": "sample string 7", "address_line1": "sample string 8", "address_line2": "sample string 9", "latitude": 10.1, "longitude": 11.1 } } ] }
## Company Info [/company]
### Get By Company Alias[GET /companies/{company_alias}]
Returns company information.
+ Parameters
+ company_alias: `limotest1` (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "company_alias": "sample string 1", "name": "sample string 2", "country_code": "sample string 3", "state_code": "sample string 4", "postal_code": "sample string 5", "city": "sample string 6", "address_line1": "sample string 7", "address_line2": "sample string 8", "business_number": "sample string 9", "is_business_number_visible": true, "phone1": "sample string 11", "phone2": "sample string 12", "fax": "sample string 13", "general_email": "sample string 14", "reservation_email": "sample string 15", "billing_email": "sample string 16", "quote_email": "sample string 17", "website_url": "sample string 18", "logo_image_url": "sample string 19", "company_modules": [ "sample string 1", "sample string 2" ] }
## Countries [/countries]
The available countries in which the operator can accept a booking for. If the country is not in the resource list, a booking cannot be made for that location.
### Get Collection [GET /resources/countries?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of countries.
+ Parameters
+ search_for: (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "name": "sample string 1", "alpha2_code": "sample string 2", "alpha3_code": "sample string 3", "numeric3_code": "sample string 4" }, { "name": "sample string 1", "alpha2_code": "sample string 2", "alpha3_code": "sample string 3", "numeric3_code": "sample string 4" } ] }
## FBOs [/fbos]
Fixed-Base Operators are private entities (primarily business or corporate) which operate out of an airport.
### Get Collection [GET /companies/{company_alias}/resources/fbos?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of FBOs.
+ Parameters
+ search_for: (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{"total_count":2,"items":[{"airport_iata":"sample string 1","name":"sample string 2","address":{"name":"sample string 3","country_code":"sample string 4","state_code":"sample string 5","postal_code": "sample string 6","city":"sample string 7","address_line1":"sample string 8","address_line2":"sample string 9"},"location":{"latitude": 1.1,"longitude": 2.1}},{"airport_iata":"sample string 10","name":"sample string 11","address":{"name":"sample string 12","country_code":"sample string 13","state_code":"sample string 14","postal_code":"sample string 15","city":"sample string 16","address_line1": "sample string 17","address_line2":"sample string 18"},"location":{"latitude":1.1,"longitude":2.1}}]}
## Occasions [/occasions]
Occasions can be used to provide additional event info to the operator about the booking. Example Occasions might include "Birthday" or "Wedding."
Aside from providing additional info for the fulfillment of the booking, this information could provide useful to the operator for reporting purposes.
### Get Collection [GET /companies/{company_alias}/resources/occasions?page_index={page_index}&page_size={page_size}]
Returns a paged collection of Occasions.
+ Parameters
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "id": 2, "name": "sample string 3" }, { "id": 2, "name": "sample string 3" } ] }
## Payment Types [/payment_types]
The available Payment Types (methods) for which a customer may pay for bookings.
### Get Collection [GET /companies/{company_alias}/resources/payment_types?page_index={page_index}&page_size={page_size}]
Returns a paged collection of Payment Types.
+ Parameters
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "id": 1, "name": "sample string 3", "type": "other" }, { "id": 1, "name": "sample string 3", "type": "other" } ] }
## Privacy Policy [/policy]
This is generally different than a rental agreement and is usually required by a payment processor to be available to a customer prior to creating a booking.
### Get Privacy Policy [GET /companies/{company_alias}/resources/ores/privacy_policy]
+ Parameters
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "content": "sample string 2" }
## Referral Sources [/referral_sources]
Referral Sources are used to specify how a user learned of the operator's services. Example Referral Sources might be "television commercial" or "internet search."
### Get Collection [GET /companies/{company_alias}/resources/referral_sources?page_index={page_index}&page_size={page_size}]
Returns a collection of Referral Sources.
+ Parameters
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "id": 1, "name": "sample string 2", "description": "sample string 3" }, { "id": 1, "name": "sample string 2", "description": "sample string 3" } ] }
## Rental Agreements [/rental_agreements]
### Get By Id [GET /companies/{company_alias}/resources/rental_agreements/{id}]
+ Parameters
+ id: `1` (required, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "id": 1, "name": "sample string 2", "text": "sample string 3" }
## Seaports [/seaports]
### Get Collection [GET /companies/{company_alias}/resources/seaports?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of Seaports.
+ Parameters
+ search_for: (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{"total_count":2,"items":[{"id":1,"code":"sample string 1","name":"sample string 2","address":{"name":"sample string 3","country_code":"sample string 4","state_code":"sample string 5","postal_code": "sample string 6","city":"sample string 7","address_line1":"sample string 8","address_line2":"sample string 9"},"location":{"latitude": 1.1,"longitude": 2.1}},{"id":2,"code": "sample string 10","name": "sample string 11","address":{"name":"sample string 12","country_code":"sample string 13","state_code":"sample string 14","postal_code":"sample string 15","city":"sample string 16","address_line1": "sample string 17","address_line2":"sample string 18"},"location":{"latitude":1.1,"longitude":2.1}}]}
## Service Types [/service-type]
Service Types are descriptions of the ride service being booked. Every Service Type has at least one pricing model associated with it to automate price calculation.
For example, a Service Type of "As Directed" with a pricing model of "Hourly and Distance" or a Service Type of "Airport Arrival" with a pricing type of "Fixed."
### Read [GET /companies/{company_alias}/resources/service_types/{id}]
Returns Service Type by Id.
+ Parameters
+ id: `1` (required, int)
+ company_alias: (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "id": 1, "name": "sample string 2", "rental_agreement_id": 1, "pricing_type": [ "per_hour", "per_passenger", "distance", "fixed", "fixed_or_distance" ], "pickup_template": [ "account_stored_address", "airport", "fbo", "stored_poi", "global_poi" ,"seaport", "google_address" ],"dropoff_template": [ "account_stored_address", "airport", "fbo", "stored_poi", "global_poi" ,"seaport", "google_address" ],"stop_template": [ "account_stored_address", "airport", "fbo", "stored_poi", "global_poi" ,"seaport", "google_address" ] }
### Get Collection [GET /companies/{company_alias}/resources/service_types?page_index={page_index}&page_size={page_size}]
Returns collection of Service Types.
+ Parameters
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ company_alias: (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "id": 1, "name": "sample string 2" }, { "id": 1, "name": "sample string 2" } ] }
## System Settings [/system-settings]
System settings represent configurable options which affect the system behavior. For instance, requirements to be met for booking new ride or sending reservation modifications.
Additional validation is recommended to be done on the client side to avoid receiving technical error messages in such case as attempting to pay without a credit card when the one is required.
### Get [GET /companies/{company_alias}/settings/system]
Returns Company System settings.
+ Parameters
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "service_type_mapping": { "default_hourly_service_type_id": 1, "default_airport_departure_service_type_id": 1, "default_airport_arrival_service_type_id": 1, "default_point_to_point_service_type_id": 1 }, "ores": { "is_ores_enabled": true, "is_credit_card_required": true, "is_billing_address_required": true, "max_authentication_attempt_count": 1, "default_payment_gateway_id": 1, "payment_transaction_type": "authorization_and_capture", "default_rental_agreement_id": 1, "allowed_payment_types": [ 1, 2 ], "is_rate_calculation_enabled": true, "is_reservation_auto_approve_enabled": true, "is_create_account_allowed": true, "is_create_quote_allowed": true, "is_create_reservation_allowed": true, "create_reservation_allowed_up_to": 1, "is_cancel_and_modify_reservation_allowed": true, "cancel_and_modify_reservation_allowed_up_to": 1, "is_reservation_cut_off_enabled": true, "reservation_cut_off_for_customer_begins_at": "00:00:00.1234567", "reservation_cut_off_for_customer_ends_at": "00:00:00.1234567" } }
## UI Settings [/ui-settings]
UI System settings represent configurable options which affect the UI behavior. Take into account usage of these settings as a guide when building a customer-facing application.
### Get [GET /companies/{company_alias}/settings/ui]
Returns operator's UI settings.
+ Parameters
+ company_alias: limotest1 (required, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{
"ores":{
"default_date_format":"MM/dd/yyyy",
"default_time_format":"hh:mm tt",
"default_date_time_format":"MM/dd/yyyy hh:mm tt",
"is_quote_creation_enabled_if_rates_not_found":true,
"is_booking_creation_enabled":true,
"location_type_display_order":[
"airport",
"stored_address",
"address",
"poi",
"seaport",
"fbo"
],
"rate_lookup_display_type":"row",
"message_on_missing_rate_result_for_return_trip":"sample string 1",
"message_on_reservation_auto_accept_enabled":"sample string 2",
"message_on_reservation_auto_accept_disabled":"sample string 3",
"message_on_credit_card_required":"sample string 4",
"message_on_reservation_cut_off_enabled":"sample string 5",
"message_on_ores_disabled":"sample string 6",
"is_rate_grouping_allowed":true,
"is_dedicated_quote_link_enabled":true,
"is_airport_instructions_visible":true,
"is_flight_details_on_dropoff_location_visible":true,
"is_child_seats_visible":true,
"is_promotion_code_visible":true,
"is_airport_pickup_options_visible":true,
"design":{
"primary_button_style":{
"background_color":{
"from_color":"#ffffff",
"to_color":"#ffffff"
},
"border_color":"#ffffff",
"text_color":"#000000"
},
"accent_button_style":{
"background_color":{
"from_color":"#ffffff",
"to_color":"#ffffff"
},
"border_color":"#ffffff",
"text_color":"#000000"
},
"warning_button_style":{
"background_color":{
"from_color":"#ffffff",
"to_color":"#ffffff"
},
"border_color":"#ffffff",
"text_color":"#000000"
},
"default_input_style":{
"button_color":{
"from_color":"#ffffff",
"to_color":"#ffffff"
},
"border_color":"#ffffff",
"placeholder_text_color":"#000000"
},
"top_menu_background_color":"#ffffff",
"top_menu_border_color":"#ffffff",
"step_wizard_bar_background_color":"#ffffff",
"dash_line_color":"#ffffff",
"dashboard_menu_text_color":"#000000",
"text_color":"#000000",
"background_color":"#ffffff"
}
},
"ores_mobile":{
"logotype":"http://webapihelppage2.com",
"background_color":"#ffffff",
"theme_color":"#ffffff",
"attention_color":"#ffffff",
"text_color":"#000000",
"background_images":[
"http://webapihelppage1.com",
"http://webapihelppage2.com"
]
}
}
## Group Customer Resources
<a name="customer_resources"></a>
Resources which are only available to a logged-in customer.
## Customer Account [/customer_self_account]
Provides management operations of the customer's account information.
### Update Password [PUT /customers/self/password]
Updates the password for the account.
+ Parameters
+ Request
+ `new_password` (string) Required. String length: inclusive between 3 and 50.
+ `current_password` (string) Required. String length: inclusive between 0 and 50.
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Body
{ "new_password": "Test@2015!^UD", "current_password": "Test@2014!^UD" }
### Update Email [PUT /customers/self/email]
Updates the email address for the account.
+ Parameters
+ Request
+ `new_email` (string) Required. Email address. String length: inclusive between 0 and 255.
+ `current_password` (string) Required. String length: inclusive between 0 and 50.
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Body
{ "new_email": "[email protected]", "current_password": "[email protected]" }
### Update [PUT /customers/self]
Updates all information for the account.
+ Parameters
+ Request
+ `prefix` (string) String length: inclusive between 0 and 50.
+ `first_name` (string) Required. String length: inclusive between 0 and 50.
+ `last_name` (string) Required. String length: inclusive between 0 and 50.
+ `position` (string) String length: inclusive between 0 and 50.
+ `department` (string) String length: inclusive between 0 and 50.
+ `company` (string) String length: inclusive between 0 and 50.
+ `address` (object)
+ `address.name` (string) String length: inclusive between 0 and 500.
+ `address.phone` (string) Phone number. String length: inclusive between 0 and 50.
+ `address.country_code` (string) String length: inclusive between 0 and 5.
+ `address.state_code` (string) String length: inclusive between 0 and 5.
+ `address.postal_code` (string) String length: inclusive between 0 and 15.
+ `address.county` (string) String length: inclusive between 0 and 250.
+ `address.city` (string) String length: inclusive between 0 and 250.
+ `address.address_line1` (string) String length: inclusive between 0 and 250.
+ `address.address_line2` (string) String length: inclusive between 0 and 250.
+ `address.latitude` (float)
+ `address.longitude` (float)
+ `home_phone` (string) Phone number. String length: inclusive between 0 and 50.
+ `office_phone` (string) Phone number. String length: inclusive between 0 and 50.
+ `cellular_phone1` (string) Phone number. String length: inclusive between 0 and 50.
+ `cellular_phone2` (string) Phone number. String length: inclusive between 0 and 50.
+ `cellular_phone3` (string) Phone number. String length: inclusive between 0 and 50.
+ `fax1` (string) Phone number. String length: inclusive between 0 and 50.
+ `fax2` (string) Phone number. String length: inclusive between 0 and 50.
+ `emails` (array)
+ `emails[].email` (string) Required. Email address. String length: inclusive between 0 and 255.
+ `emails[].type` (object)
+ `default_payment_type_id` (int) Range: inclusive between 1 and 2147483647.
+ `default_credit_card_id` (int) Range: inclusive between 1 and 2147483647.
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Body
{ "prefix": "Mr.", "first_name": "John", "last_name": "Smith", "position": "Software developer", "department": "IT department", "company": "Limo Anywhere", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 55.5555, "longitude": 33.3333 }, "home_phone": "+1-234-1111112", "office_phone": "+1-234-1111111", "cellular_phone1": "+1-234-1111113", "cellular_phone2": "+1-234-1111114", "cellular_phone3": "+1-234-1111115", "fax1": "+1-234-1111116", "fax2": "+1-234-1111117", "emails": [ { "email": "[email protected]", "type": [ "confirmation", "automatic_notification", "payment_receipt", "invoice", "other" ] }, { "email": "[email protected]", "type": [ "confirmation", "automatic_notification", "payment_receipt", "invoice", "other" ] } ], "default_payment_type_id": 111, "default_credit_card_id": 222 }
### Get [GET /customers/self]
Returns account information.
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "id": 1, "parent_id": 1, "email": "[email protected]", "number": "1234567890", "is_billing_contact": true, "is_booking_contact": true, "is_passenger": true, "is_active": true, "prefix": "Mr.", "first_name": "John", "last_name": "Smith", "position": "Software developer", "department": "IT department", "company": "Limo Anywhere", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 }, "home_phone": "+1-234-1111112", "office_phone": "+1-234-1111111", "cellular_phone1": "+1-234-1111113", "cellular_phone2": "+1-234-1111114", "cellular_phone3": "+1-234-1111115", "fax1": "+1-234-1111116", "fax2": "+1-234-1111117", "emails": [ { "email": "[email protected]", "type": [ "confirmation", "automatic_notification", "payment_receipt", "invoice", "other" ] }, { "email": "[email protected]", "type": [ "confirmation", "automatic_notification", "payment_receipt", "invoice", "other" ] } ] }
## Customer Address [/customer-self-address]
Provides management operations of customer's Stored Addresses.
### Get Collection [GET /customers/self/addresses?search_for={search_for}&page_index={page_index}&page_size={page_size}]
Returns a paged collection of the customer's Stored Addresses.
+ Parameters
+ search_for: (optional, string)
+ page_index: 1 (optional, int)
+ page_size: 20 (optional, int)
+ type: (optional, string)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "total_count": 1, "items": [ { "id": 1, "type": "other", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 } } ] }
### Create [POST /customers/self/addresses]
Create a Stored Address.
+ Parameters
+ Request
+ `type` (object) Required.
+ `type.value` (string)
+ `address` (object) Required.
+ `address.name` (string) String length: inclusive between 0 and 500.
+ `address.phone` (string) Phone number. String length: inclusive between 0 and 50.
+ `address.country_code` (string) String length: inclusive between 0 and 5.
+ `address.state_code` (string) String length: inclusive between 0 and 5.
+ `address.postal_code` (string) String length: inclusive between 0 and 15.
+ `address.county` (string) String length: inclusive between 0 and 250.
+ `address.city` (string) String length: inclusive between 0 and 250.
+ `address.address_line1` (string) String length: inclusive between 0 and 250.
+ `address.address_line2` (string) String length: inclusive between 0 and 250.
+ `address.latitude` (float)
+ `address.longitude` (float)
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Body
{ "type": "home", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 } }
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "id": 1, "type": "other", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 } }
### Read [GET /customers/self/addresses/{id}]
Read a Stored Address.
+ Parameters
+ id: `1` (required, int)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json
+ Body
{ "id": 1, "type": "other", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 } }
### Update [PUT /customers/self/addresses/{id}]
Update a Stored Address.
+ Parameters
+ id: `1` (required, int)
+ Request
+ `type` (object) Required.
+ `type.value` (string)
+ `address` (object) Required.
+ `address.name` (string) String length: inclusive between 0 and 500.
+ `address.phone` (string) Phone number. String length: inclusive between 0 and 50.
+ `address.country_code` (string) String length: inclusive between 0 and 5.
+ `address.state_code` (string) String length: inclusive between 0 and 5.
+ `address.postal_code` (string) String length: inclusive between 0 and 15.
+ `address.county` (string) String length: inclusive between 0 and 250.
+ `address.city` (string) String length: inclusive between 0 and 250.
+ `address.address_line1` (string) String length: inclusive between 0 and 250.
+ `address.address_line2` (string) String length: inclusive between 0 and 250.
+ `address.latitude` (float)
+ `address.longitude` (float)
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Body
{ "type": "home", "address": { "name": "Pick Up Address", "phone": "+1-234-1111110", "country_code": "US", "state_code": "NY", "postal_code": "11111", "county": "Delaware", "city": "New York", "address_line1": "123 Main Street", "address_line2": "123 Second Street", "latitude": 0.0, "longitude": 0.0 } }
### Delete [DELETE /customers/self/addresses/{id}]
Delete a Stored Address.
+ Parameters
+ id: `1` (required, int)
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
## Customer Billing Contact [/customer-self-billing-contact]
Provides read operations for a customer's Billing Contact.
A Billing Contact is the person responsible for paying the bills. It could be the same person as the Passenger or a dedicated individual who handles one or more accounts.
### Get [GET /customers/self/billing_contact]
Returns the Billing Contact information for the account.
+ Request
+ Headers
Content-Type: application/json
Authorization: bearer {access_token}
+ Response 200
+ Headers
Content-Type: application/json