-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
3820 lines (3755 loc) · 124 KB
/
openapi.yaml
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
openapi: 3.0.0
info:
title: Milefy API
description: >
## Introduction
Welcome to the 30K Milefy API documentation!
#### What does the Milefy API do?
You can use it to:
1. Calculate **mileage earnings** for specific flights,
2. Learn which flights are eligible for **upgrades to a higher cabin**, e.g.
from Economy to Business,
3. Get a list of all **status benefits** that apply for each flight based on
the travelers’s frequent flyer program status tier.
4. Get a full list of **fare attributes** including seat selection, checked
baggage, changeability and others.
5. Track traveler frequent flyer accounts.
Milefy API is a REST service using HTTPS protocol and JSON format to encode
both request and response data.
#### Request headers
To enforce proper request encoding and its compression you should always set
following headers:
##### Data format
We use JSON format enchanced with <a
href="http://stateless.co/hal_specification.html" target="_blank"
title="Learn more about HAL and hypermedia">HAL hypermedia type</a>.
Header: ```Accept: application/hal+json```
##### Character encoding
Header: ```Content-Type: application/json;charset=UTF-8```
##### API version
Since version 2.5, we require the setting of an additional request header,
which indicates which version of Milefy API you want to use. In case header
is absent, version 2.4 will be used by default (not recommended).
Header: ```X-Api-Version: v3.0```
## Performance
#### Large flight result sets
When working with large flight result sets processed by [Calculate
attributes & benefits](http://milefy-api-docs.30k.com) method, it’s
recommended to **divide them into smaller batches and send them in
simultaneous requests**. When received, the multiple responses should then
be remerged into a single result set. For example, instead of sending a
single request containing a result set of 1,000 different flights, you can
send 5 smaller requests simultaneously, each consisting of 200 flights.
All divided requests for the same result set are billed as only one request.
In order to assure that, you only need to fulfill the following two
conditions:
1. All requests need to be send almost at the same time (we need to receive
them within a frame of less than 30 seconds),
2. The flights need to be split into chunks of 50-200 flights.
## Used constants
Lists of constant values used in API and their definitions (click to
expand):
1. [Status tiers](http://milefy-api-docs.30k.com), used for example in [Get
program](http://milefy-api-docs.30k.com) method.
2. [Types of miles](http://milefy-api-docs.30k.com), used for example in
[Get program](http://milefy-api-docs.30k.com) method.
3. [Airline alliances](http://milefy-api-docs.30k.com), used for example in
[Get program](http://milefy-api-docs.30k.com) method.
4. [Cabin classes](http://milefy-api-docs.30k.com), used for example in
[Calculate attributes & benefits](http://milefy-api-docs.30k.com) method.
5. [Status benefits](http://milefy-api-docs.30k.com), used for example in
[Get status benefit type](http://milefy-api-docs.30k.com) method.
6. [Fare attributes](http://milefy-api-docs.30k.com), used for example in
[Get fare attribute type](http://milefy-api-docs.30k.com) method.
7. [Error codes](http://milefy-api-docs.30k.com), used across all methods.
version: '3.0'
contact:
email: support@30k.com
url: http://www.30k.com/
license:
name: All rights reserverd.
x-logo:
url: logo.png
backgroundColor: '#e1f5f5'
x-konfig-ignore:
potential-incorrect-type: true
servers:
- description: Production environment
url: milefy-api.30k.com
- description: Testing environment
url: milefy-api-test.30k.com
tags:
- description: >-
Methods to get lists of supported frequent flyer programs and status
benefits. You can **cache this information locally** for about 1 day since
this data doesn't change frequently.
name: Static data
- description: Methods to create and manage traveler's profiles.
name: Travelers
- description: Methods to create and manage traveler's frequent flyer memberships.
name: Memberships
- description: Methods used to calculate frequent flyer data for flight search results.
name: Flights
paths:
/programs:
get:
tags:
- Static data
summary: Get program collection
operationId: StaticData_getFrequentFlyerPrograms
description: >
Returns a list of all supported frequent flyer programs. You can use
this data to:
1. Build a user dashboard (a mileage wallet), allowing user to [manage
his frequent flyer memberships](http://milefy-api-docs.30k.com),
2. Display frequent flyer miles, cabin upgrades and status benefits when
combined with [Calculate attributes &
benefits](http://milefy-api-docs.30k.com) method.
parameters:
- description: Filter programs based on supported authentication method(s)
name: authentication
in: query
required: false
example: simple,none
schema:
type: string
items:
type: string
enum:
- simple
- none
- oauth
pattern: ^(?:simple|none|oauth)(?:,(?:simple|none|oauth))*$
responses:
'200':
description: Program collection returned
content:
application/hal+json:
schema:
$ref: >-
#/components/schemas/StaticDataGetFrequentFlyerProgramsResponse
/programs/{code}:
get:
tags:
- Static data
summary: Get program
operationId: StaticData_getFrequentFlyerProgram
description: |
Returns requested frequent flyer program.
parameters:
- $ref: '#/components/parameters/programCode'
responses:
'200':
description: Program
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Program'
'400':
$ref: '#/components/responses/InvalidProgramCode'
'404':
description: Not found
/benefits:
get:
tags:
- Static data
summary: Get status benefit type collection
operationId: StaticData_getStatusBenefitTypeCollection
description: >
Returns the list of status benefit types such as: lounge access,
priority check-in or extra baggage. The list is ordered by name.
responses:
'200':
description: Benefit collection returned
content:
application/hal+json:
schema:
$ref: >-
#/components/schemas/StaticDataGetStatusBenefitTypeCollectionResponse
/benefits/{code}:
get:
tags:
- Static data
summary: Get status benefit type
operationId: StaticData_getStatusBenefitType
description: >
Returns requested status benefit type such as: lounge access, priority
check-in or extra baggage.
parameters:
- description: Status benefit type code
name: code
in: path
required: true
example: CMPCHG
schema:
type: string
responses:
'200':
description: Status benefit type
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BenefitType'
'400':
description: Invalid benefit type code
'404':
description: Not found
/attributes:
get:
tags:
- Static data
summary: Get fare attribute type collection
operationId: StaticData_getFareAttributeTypes
description: >
Returns the list of fare attribute types such as: changeability or
baggage allowance. The list is ordered by name.
responses:
'200':
description: Fare attribute collection returned
content:
application/hal+json:
schema:
$ref: '#/components/schemas/StaticDataGetFareAttributeTypesResponse'
/attributes/{code}:
get:
tags:
- Static data
summary: Get fare attribute type
operationId: StaticData_getFareAttributeType
description: >
Returns requested fare attribute type such as: changeability or baggage
allowance.
parameters:
- description: Fare attribute type code
name: code
in: path
required: true
example: XTRBGG
schema:
type: string
responses:
'200':
description: Fare attribute type
content:
application/hal+json:
schema:
$ref: '#/components/schemas/FareAttributeType'
'400':
description: Invalid fare attribute type code
'404':
description: Not found
/calculate:
post:
tags:
- Flights
summary: Calculate attributes & benefits
operationId: Flights_calculateAttributesBenefits
description: >
Returns a subset of features, selectable between the mileage earnings,
cabin upgrades and status benefits for all flights in a request.
Results are **personalized** for specified traveler and his frequent
flyer memberships.
If traveler has no memberships, results will be calculated based on
frequent flyer program of the **marketing carrier** of each flight. For
example if marketing carrier is Delta, frequent flyer information will
be returned for Delta SkyMiles program.
parameters:
- $ref: '#/components/parameters/fields'
- description: >
[Traveler](http://milefy-api-docs.30k.com) ID for the flight results
personalization.
name: traveler
in: query
required: true
example: abc111
schema:
type: string
- description: >
If not specified, ```memberships``` is assumed as default value,
which results in calculations returned for traveler's memberships.
Alternatively you can use ```memberships_and_default_program```
value to get calculations for both: traveler's memberships and
default program of marketing airline in case none of memberships
apply for a particular flight.
name: scope
in: query
required: false
schema:
type: string
enum:
- memberships
- memberships_and_default_program
- description: Client ID for statistical purposes
name: sourceClientId
in: query
required: false
example: source-client-abc-111
schema:
type: string
requestBody:
description: Collection of flights to calculate frequent flyer data for.
content:
application/json:
schema:
$ref: '#/components/schemas/FlightsCalculateAttributesBenefitsRequest'
required: true
responses:
'200':
description: Successful calculation
content:
application/hal+json:
schema:
$ref: >-
#/components/schemas/FlightsCalculateAttributesBenefitsResponse
'400':
description: Invalid request
content:
application/hal+json:
schema:
$ref: >-
#/components/schemas/FlightsCalculateAttributesBenefits400Response
/fare-attributes:
post:
tags:
- Flights
summary: Calculate fare attributes
operationId: Flights_calculateFareAttributes
description: Returns fare family attributes for specified flight legs.
parameters:
- title: Calculation scope
description: >
Scope of calculation: ```attributes``` to return only fare
attributes and ```attributes_and_mileage``` to return both fare
attributes and mileage earnings.
in: query
required: false
schema:
type: string
enum:
- attributes
- attributes_and_mileage
default: attributes
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FlightsCalculateFareAttributesRequest'
required: true
responses:
'200':
description: Successful calculation
content:
application/hal+json:
schema:
$ref: '#/components/schemas/FlightsCalculateFareAttributesResponse'
'400':
description: Invalid request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/FlightsCalculateFareAttributes400Response'
/travelers:
post:
tags:
- Travelers
summary: Create traveler
operationId: Travelers_createProfile
description: >
Creates a traveler profile for [frequent flyer info
calculations](http://milefy-api-docs.30k.com). The profile should be
re-used with traveler ID stored as browser **cookie**, in
**localStorage** or native app equivalent until persistent user account
in database is created with embedded traveler ID.
requestBody:
$ref: '#/components/requestBodies/createTravelerTraveler'
responses:
'201':
description: Traveler created
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Traveler'
'400':
$ref: '#/components/responses/InvalidTraveler'
get:
tags:
- Travelers
summary: Get traveler collection
operationId: Travelers_listCollection
description: >-
Returns collection of all created travelers. For larger collections you
need to use **pagination** links.
parameters:
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: Traveler collection returned
content:
application/hal+json:
schema:
$ref: '#/components/schemas/TravelersListCollectionResponse'
/travelers/{id}:
get:
tags:
- Travelers
summary: Get traveler
operationId: Travelers_getProfile
description: Returns requested traveler's profile.
parameters:
- $ref: '#/components/parameters/travelerId'
responses:
'200':
description: Traveler returned
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Traveler'
'404':
$ref: '#/components/responses/TravelerNotFound'
put:
tags:
- Travelers
summary: Edit traveler
operationId: Travelers_updateProfile
description: Edit an existing traveler's profile.
parameters:
- $ref: '#/components/parameters/travelerId'
requestBody:
$ref: '#/components/requestBodies/createTravelerTraveler'
responses:
'200':
description: Traveler edited successfully
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Traveler'
'400':
$ref: '#/components/responses/InvalidTraveler'
'404':
$ref: '#/components/responses/TravelerNotFound'
delete:
tags:
- Travelers
summary: Delete traveler
operationId: Travelers_removeProfile
description: Deletes traveler's profile
parameters:
- $ref: '#/components/parameters/travelerId'
responses:
'204':
description: Traveler deleted
'404':
$ref: '#/components/responses/TravelerNotFound'
/travelers/{id}/memberships:
post:
tags:
- Memberships
summary: Create membership
operationId: Memberships_createFrequentFlyerProgramMembership
description: >-
Creates a frequent flyer program membership for a particular traveler's
profile.
parameters:
- $ref: '#/components/parameters/travelerId'
requestBody:
$ref: '#/components/requestBodies/createMembershipMembership'
responses:
'201':
description: Membership created
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Membership'
'400':
$ref: '#/components/responses/InvalidMembership'
'404':
$ref: '#/components/responses/TravelerNotFound'
'409':
description: Conflict (such membership already exists)
get:
tags:
- Memberships
summary: Get membership collection
operationId: Memberships_getList
description: Returns list of memberships, that belongs to the specified traveler.
parameters:
- $ref: '#/components/parameters/travelerId'
responses:
'200':
$ref: '#/components/responses/MembershipCollection'
'404':
$ref: '#/components/responses/TravelerNotFound'
/travelers/{id}/memberships/{code}:
get:
tags:
- Memberships
summary: Get membership
operationId: Memberships_getMembershipByCode
description: >-
Returns requested traveler's membership based on its frequent flyer
program code.
parameters:
- $ref: '#/components/parameters/travelerId'
- $ref: '#/components/parameters/programCode'
responses:
'200':
description: Membership returned
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Membership'
'404':
$ref: '#/components/responses/TravelerOrMembershipNotFound'
put:
tags:
- Memberships
summary: Edit membership
operationId: Memberships_editTravelerMembership
description: >
Edit requested traveler's membership based on its frequent flyer program
code.
parameters:
- $ref: '#/components/parameters/travelerId'
- $ref: '#/components/parameters/programCode'
requestBody:
$ref: '#/components/requestBodies/createMembershipMembership'
responses:
'200':
description: Membership edited
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Membership'
'400':
$ref: '#/components/responses/InvalidMembership'
'404':
$ref: '#/components/responses/TravelerOrMembershipNotFound'
'409':
$ref: '#/components/responses/InvalidMembershipAuthentication'
delete:
tags:
- Memberships
summary: Delete membership
operationId: Memberships_deleteMembership
description: >-
Deletes requested traveler's membership based on its frequent flyer
program code.
parameters:
- $ref: '#/components/parameters/travelerId'
- $ref: '#/components/parameters/programCode'
responses:
'204':
description: Membership deleted
'404':
$ref: '#/components/responses/TravelerOrMembershipNotFound'
components:
parameters:
version:
description: API version
name: X-Api-Version
in: header
schema:
type: string
default: '3.0'
programCode:
description: Frequent flyer program code
name: code
in: path
required: true
example: BAC
schema:
type: string
pattern: ^[A-Z]{3}$
fields:
description: >
Used to select returned properties and optimize the processing time of
the request. Based on XPath queries. [Learn
more](http://milefy-api-docs.30k.com).
name: fields
in: query
required: false
example: id,flights(id,programs(code,statusTiers(mileageEarnings)))
schema:
type: string
travelerId:
description: Traveler ID
name: id
in: path
required: true
example: abc111
schema:
type: string
offset:
description: Number of items skipped from the beginning of the collection.
name: offset
in: query
example: 100
schema:
type: integer
limit:
description: Maximum number of items to return.
name: limit
in: query
schema:
type: integer
default: 100
encoding:
description: Requested compression
name: Accept-Encoding
in: header
schema:
type: string
default: gzip
contentType:
description: Requested content type
name: Accept
in: header
schema:
type: string
default: application/hal+json;q=1, application/json;q=0.8
charset:
description: Requested charset
name: Accept-Charset
in: header
schema:
type: string
default: utf-8
responses:
MembershipCollection:
description: Membership collection returned
content:
application/hal+json:
schema:
$ref: '#/components/schemas/MembershipsGetListResponse'
InvalidProgramCode:
description: Invalid program code
InvalidTraveler:
description: Invalid request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/TravelersCreateProfileResponse'
InvalidMembership:
description: Invalid request
content:
application/hal+json:
schema:
$ref: >-
#/components/schemas/MembershipsCreateFrequentFlyerProgramMembershipResponse
InvalidMembershipAuthentication:
description: Authentication method conflict
content:
application/hal+json:
schema:
$ref: '#/components/schemas/MembershipsEditTravelerMembershipResponse'
TravelerNotFound:
description: Not found
MembershipInvalidEncryptionKey:
description: Bad request (including invalid credentials encryption)
TravelerOrMembershipNotFound:
description: Not found
content:
application/hal+json:
schema:
$ref: '#/components/schemas/MembershipsDeleteMembershipResponse'
TravelerOrMembershipOrAuthNotFound:
description: Not found
content:
application/hal+json:
schema:
title: Error
type: object
required:
- code
- message
properties:
code:
title: Error code
description: >-
Check [the meaning of all possible
values](http://milefy-api-docs.30k.com).
type: string
enum:
- TRVNF
- MBPNF
- MBNATH
example: TRVNF
message:
title: Human-readable message
description: Only for debugging purposes and not for the end-user benefit.
type: string
example: Traveler not found
MembershipTimeout:
description: Connection timeout (traveler's account can't be accessed).
MembershipAuthImpossible:
description: Forbidden (membership doesn't have stored credentials)
MembershipBadGateway:
description: Bad gateway
content:
application/hal+json:
schema:
title: Error
type: object
required:
- code
- message
properties:
code:
title: Error code
description: >
Check [the meaning of all error
codes](http://milefy-api-docs.30k.com).
type: string
enum:
- MBINV
- MBLKD
example: MBINV
message:
title: Human-readable message
description: Only for debugging purposes and not for the end-user benefit.
type: string
example: Invalid membership authentication credentials
requestBodies:
createMembershipMembership:
description: Frequent flyer membership of a particular traveler.
content:
application/json:
schema:
$ref: >-
#/components/schemas/MembershipsCreateFrequentFlyerProgramMembershipRequest
required: true
createTravelerTraveler:
description: Traveler profile
content:
application/json:
schema:
$ref: '#/components/schemas/TravelersCreateProfileRequest'
securitySchemes:
apiKey:
description: >
We use SSL to transmit data from client to our service. You must
authenticate client with provided API key passed as parameter in query
string. [Don't have API key?](mailto:support@30k.com)
#### URL example
```https://milefy-api.30k.com/travelers?apiKey=eW91cmxvZ2luOnlvd```
name: apiKey
type: apiKey
in: query
schemas:
Traveler:
type: object
required:
- id
- _links
properties:
_links:
title: Links wrapper
description: >
Links according to <a
href="http://stateless.co/hal_specification.html" title="Learn more"
target="_blank">HAL specification</a>.
type: object
required:
- self
- thirtyk:memberships
properties:
self:
title: Self-reference
description: Link to the same resource
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc111
thirtyk:memberships:
title: Get membership collection
description: Link to get traveler's list of memberships
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc111/memberships
index:
title: Get traveler collection
description: Link to get list of all travelers
type: object
required:
- href
properties:
href:
type: string
example: /travelers
curies:
$ref: '#/components/schemas/Curies'
id:
title: Traveler ID
description: Traveler ID
example: abc111
type: string
country:
title: Country code
description: IATA country code for traveler residence country.
type: string
pattern: '[A-Z]{2}'
example: DE
SimpleAuth:
type: object
required:
- _links
- formInputs
- storedCredentials
properties:
_links:
title: Links wrapper
description: >
Links according to <a
href="http://stateless.co/hal_specification.html" title="Learn more"
target="_blank">HAL specification</a>.
type: object
required:
- self
- thirtyk:membership
properties:
self:
title: Self-reference
description: Link to the same resource
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123/memberships/BAC/authentication/simple
thirtyk:membership:
title: Get membership
description: |
Link to get a membership
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123/memberships/BAC
curies:
$ref: '#/components/schemas/Curies'
storedCredentials:
title: Are all credentials stored?
description: >
Having all credentials stored, allows to autoamtically update
membership's mileage earnings using [Update
membership](http://milefy-api-docs.30k.com) method.
type: boolean
example: true
formInputs:
$ref: '#/components/schemas/FormInputs'
Membership:
type: object
required:
- _links
- program
- authentication
- awardMilesExpire
properties:
_links:
title: Links wrapper
description: >
Links according to <a
href="http://stateless.co/hal_specification.html" title="Learn more"
target="_blank">HAL specification</a>.
type: object
required:
- self
- thirtyk:traveler
- thirtyk:program
properties:
self:
title: Self-reference
description: Link to the same resource
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123/memberships/BAC
thirtyk:traveler:
title: Get traveler
description: Link to get a traveler, that is assigned to the membership
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123
thirtyk:simpleauth:
title: Get authentication
description: Link to get simple membership authentication information
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123/memberships/BAC/authentication/simple
index:
title: Get membership collection
description: Link to get membership collection for the same traveler
type: object
required:
- href
properties:
href:
type: string
example: /travelers/abc123/memberships
thirtyk:program:
title: Get program
description: Link to get program of the membership
type: object
required:
- href
properties:
href:
type: string
example: /programs/BAC
curies:
$ref: '#/components/schemas/Curies'
program:
title: Program code
description: >-
Three-letter frequent flyer program code, that the membership
belongs to.
type: string
pattern: '[A-Z]{3}'
example: BAC
memberNumber:
title: Membership number
description: Traveler ID as recognized in particular frequent flyer program.
type: string
example: '5345436'